summaryrefslogtreecommitdiffstats
path: root/drivers/atm/nicstar.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-01-30 09:58:54 +0100
committerMarcel Holtmann <marcel@holtmann.org>2015-01-30 11:03:19 +0100
commita087a98e0767cf6c4f2480e6de5441497c9ba5b7 (patch)
treecff12cae86d3e8b4633d65b57b334c9b9885ebd7 /drivers/atm/nicstar.c
parentBluetooth: btusb: Limit hardware error handling to Intel Snowfield Peak (diff)
downloadlinux-a087a98e0767cf6c4f2480e6de5441497c9ba5b7.tar.xz
linux-a087a98e0767cf6c4f2480e6de5441497c9ba5b7.zip
Bluetooth: btusb: Fix race when waiting for BTUSB_DOWNLOADING
The test for BTUSB_DOWNLOADING must be after adding to the wait queue and setting the TASK_INTERRUPTIBLE state. Otherwise the flag may get cleared after we test for it and we end up getting a timeout since schedule_timeout() waits for the full duration. This patch uses a wait_on_bit_timeout() + wake_up_bit(). To perform the task both race-free as well as in a much simpler way. Since there's no global wait_on_bit_timeout() helper yet (even though all the building blocks for it are in place) this patch creates a temporary local btusb copy of it until the global one has made it to upstream trees. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/atm/nicstar.c')
0 files changed, 0 insertions, 0 deletions