[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5934AE51.1040105@163.com>
Date: Mon, 05 Jun 2017 09:05:21 +0800
From: Jia-Ju Bai <baijiaju1990@....com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: wporter82@...il.com, sergio.paracuellos@...il.com,
aquannie@...il.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss
On 06/03/2017 04:52 PM, Greg KH wrote:
> On Thu, Jun 01, 2017 at 11:43:35AM +0800, Jia-Ju Bai wrote:
>> The driver may sleep under a spin lock, and the function call path is:
>> rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
>> rtsx_enter_ss
>> rtsx_power_off_card
>> sd_cleanup_work
>> sd_stop_seq_mode
>> sd_switch_clock
>> sd_ddr_tuning
>> sd_ddr_pre_tuning_tx
>> sd_change_phase
>> wait_timeout
>> schedule_timeout --> may sleep
>>
>> To fix it, "wait_timeout" is replaced with mdelay in sd_change_phase.
> Nice work, how are you finding these bugs? What tools gives you this
> kind of analysis?
>
> thanks,
>
> greg k-h
Hi,
I am very glad to get your praise on my work :)
I recently write a static analysis tool for detecting sleep-in-atomic
bugs, instead of using existing tools. One reason is that I have
encountered these bugs for some times when I writing drivers.
I am still improving my tool and detecting other similar bugs in Linux
kernel. If you have suggestions or comments on my work, please feel free
to contact me :)
Thanks,
Jia-Ju Bai
Powered by blists - more mailing lists