Bluetooth: bcm203x: Fix race condition on disconnect
authorDavid Herrmann <dh.herrmann@googlemail.com>
Wed, 26 Oct 2011 09:13:13 +0000 (11:13 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 31 Oct 2011 19:51:37 +0000 (17:51 -0200)
When disconnecting a bcm203x device we kill and destroy the usb-urb, however,
there might still be a pending work-structure which resubmits the now invalid
urb. To avoid this race condition, we simply set a shutdown-flag and
synchronously kill the worker first.

This also adds a comment to all schedule_work()s, as it is really not clear
that they are used as replacement for short timers (which can be seen in the git
history).

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

No differences found