Re: [PATCH] Bluetooth: btmrvl: fix thread stopping race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

* Daniel Drake <dsd@xxxxxxxxxx> [2013-06-11 15:40:20 -0400]:

> There is currently a race condition in the btmrvl_remove_card() which
> is causing hangs on suspend for OLPC. When the race occurs,
> kthread_stop() never returns.
> 
> The problem is that btmrvl_service_main_thread() calls kthread_should_stop()
> and then does a fair number of things before restarting the loop and
> sleeping.
> 
> If the thread gets stopped after kthread_should_stop() is checked, but
> before the sleep happens, the thread will go to sleep and won't necessarily
> be woken up.
> 
> Move the kthread_should_stop() check into a race-free place.
> 
> Signed-off-by: Daniel Drake <dsd@xxxxxxxxxx>
> ---
>  drivers/bluetooth/btmrvl_main.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

Patch has been applied to bluetooth.git. Thanks.

	Gustavo
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux