]> Git Repo - linux.git/commitdiff
btusb bluetooth driver: wait for 'waker' work too before closing
authorLinus Torvalds <[email protected]>
Wed, 11 Nov 2009 21:32:29 +0000 (13:32 -0800)
committerLinus Torvalds <[email protected]>
Wed, 11 Nov 2009 21:32:29 +0000 (13:32 -0800)
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 <[email protected]>
Acked-by: Oliver Neukum <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Marcel Holtmann <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/bluetooth/btusb.c

index 7ba91aa3fe8b8898cad41d96f35f1bd9bf221f3b..2fb38027f3bb8773da3d380c8322cbb947c2ea57 100644 (file)
@@ -591,6 +591,7 @@ static int btusb_close(struct hci_dev *hdev)
                return 0;
 
        cancel_work_sync(&data->work);
+       cancel_work_sync(&data->waker);
 
        clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
        clear_bit(BTUSB_BULK_RUNNING, &data->flags);
This page took 0.056897 seconds and 4 git commands to generate.