linux/drivers/bluetooth
Daniel Drake ea05fea904 Bluetooth: btmrvl: fix thread stopping race
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@laptop.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-13 13:05:40 -04:00
..
Kconfig Bluetooth: btmrvl: support Marvell Bluetooth device SD8897 2013-06-12 10:20:54 -04:00
Makefile
ath3k.c Bluetooth: Add support for Foxconn/Hon Hai [0489:e04d] 2013-04-04 11:12:32 +03:00
bcm203x.c
bfusb.c
bluecard_cs.c drivers/bluetooth: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:04 -07:00
bpa10x.c
bt3c_cs.c drivers/bluetooth: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:04 -07:00
btmrvl_debugfs.c Bluetooth: btmrvl: use native helpers for debugfs 2013-04-23 20:44:26 -03:00
btmrvl_drv.h
btmrvl_main.c Bluetooth: btmrvl: fix thread stopping race 2013-06-13 13:05:40 -04:00
btmrvl_sdio.c Bluetooth: btmrvl: support Marvell Bluetooth device SD8897 2013-06-12 10:20:54 -04:00
btmrvl_sdio.h
btsdio.c
btuart_cs.c drivers/bluetooth: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:04 -07:00
btusb.c Bluetooth: Add support for Intel Bluetooth device [8087:07dc] 2013-04-23 20:27:48 -03:00
btwilink.c
dtl1_cs.c drivers/bluetooth: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:04 -07:00
hci_ath.c
hci_bcsp.c
hci_h4.c Bluetooth: Fix H4 crash from incoming UART packets 2013-04-04 12:35:58 +03:00
hci_h5.c
hci_ldisc.c Bluetooth: Remove trivial white space 2013-04-04 12:36:02 +03:00
hci_ll.c
hci_uart.h
hci_vhci.c