diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-11 16:32:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-11 16:32:29 -0500 |
commit | 404291ac9e72d118fcadeb939a69b2caa0a0e9ca (patch) | |
tree | e633e9d3f33b4a72ac3aea94a5868dda2828375d | |
parent | fd801452a30927ec0dff84e541191e611c1afd0c (diff) |
btusb bluetooth driver: wait for 'waker' work too before closing
Rafael debugged a resume-time hang (with oopses in workqueue handling)
on his laptop that was due to the 'waker' workqueue entry being
disconnected and then released without the workqueue entry having been
synchronized.
Several people were involved, with Oleg Nesterov doing a debugging patch
showing what workqueue entry was corrupt etc.
This was a regression introduced by commit 7bee549e19 ("Bluetooth: Add
USB autosuspend support to btusb driver") as Rafael points out (not
actually bisected, but it became clear once the bug was found).
Tested-and-reported-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Oliver Neukum <oliver@neukum.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/bluetooth/btusb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 7ba91aa3fe8b..2fb38027f3bb 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -591,6 +591,7 @@ static int btusb_close(struct hci_dev *hdev) | |||
591 | return 0; | 591 | return 0; |
592 | 592 | ||
593 | cancel_work_sync(&data->work); | 593 | cancel_work_sync(&data->work); |
594 | cancel_work_sync(&data->waker); | ||
594 | 595 | ||
595 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); | 596 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); |
596 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); | 597 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); |