Alexey Khoroshilov 9494849e53 ath9k_htc: fix data race between request_firmware_nowait() callback and suspend()
ath9k_hif_usb_probe() requests firmware asynchronically and
there is some initialization postponed till firmware is ready.
In particular, ath9k_hif_usb_firmware_cb() callback initializes
hif_dev->tx.tx_buf and hif_dev->tx.tx_pending lists.

At the same time, ath9k_hif_usb_suspend() iterates that lists through
ath9k_hif_usb_dealloc_urbs(). If suspend happens before request_firmware_nowait()
callback is called, it can lead to oops.

Similar issue could be in ath9k_hif_usb_disconnect(), but it is prevented
using hif_dev->fw_done completion and HIF_USB_READY flag. The patch extends
this approach to suspend() as well.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-17 14:34:49 -04:00
..
2013-06-17 14:38:52 -04:00
2013-06-17 14:38:52 -04:00
2013-06-03 15:55:46 -04:00
2013-06-24 14:44:28 -04:00
2013-06-24 14:44:28 -04:00
2013-04-10 14:10:33 -04:00
2013-04-10 14:10:33 -04:00
2012-11-21 14:16:02 -05:00
2013-01-11 14:12:01 -05:00
2013-06-24 14:44:23 -04:00
2013-06-24 14:44:28 -04:00
2013-06-18 14:46:48 -04:00
2013-06-03 15:55:47 -04:00
2013-06-12 15:06:55 -04:00
2013-06-03 15:55:45 -04:00
2013-06-24 14:44:27 -04:00
2013-06-03 15:55:46 -04:00