lkml.org 
[lkml]   [2018]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [BUG] mfd: ezx-pcap: Possible sleep-in-atomic-context bugs in pcap_adc_irq()
From
Date


On 2018/9/17 9:03, Lee Jones wrote:
> On Sat, 15 Sep 2018, Jia-Ju Bai wrote:
>
>> The driver may sleep in an interrupt handler.
>> The function call paths (from bottom to top) in Linux-4.17 are:
>>
>> [FUNC] mutex_lock_nested
>> drivers/mfd/ezx-pcap.c, 272:
>> mutex_lock_nested in pcap_adc_irq (interrupt handler)
>>
>> [FUNC] mutex_lock_nested
>> drivers/mfd/ezx-pcap.c, 100:
>> mutex_lock_nested in ezx_pcap_read
>> drivers/mfd/ezx-pcap.c, 281:
>> ezx_pcap_read in pcap_adc_irq (interrupt handler)
>>
>> [FUNC] mutex_lock_nested
>> drivers/mfd/ezx-pcap.c, 85:
>> mutex_lock_nested in ezx_pcap_write
>> drivers/mfd/ezx-pcap.c, 285:
>> ezx_pcap_write in pcap_adc_irq (interrupt handler)
>>
>> [FUNC] mutex_lock_nested
>> drivers/mfd/ezx-pcap.c, 244:
>> mutex_lock_nested in pcap_adc_trigger
>> drivers/mfd/ezx-pcap.c, 299:
>> pcap_adc_trigger in pcap_adc_irq (interrupt handler)
>>
>> These bugs are found by my static analysis tool DSAC.
> Not sure what you want me to do with this.
>
> Do you have something in mind?
>

I find some possible bugs in this driver, but I do not know how to
correctly fix them...
Could you find a good solution?


Best wishes,
Jia-Ju Bai

\
 
 \ /
  Last update: 2018-09-17 04:47    [W:0.043 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site