From: David Herrmann Date: Wed, 26 Oct 2011 09:13:13 +0000 (+0200) Subject: Bluetooth: bcm203x: Fix race condition on disconnect X-Git-Tag: v3.3-rc1~182^2~545^2~134^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=844e4b76cc4806827024cccf35a9beaf13d27f3d;p=pandora-kernel.git Bluetooth: bcm203x: Fix race condition on disconnect 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 Acked-by: Marcel Holtmann Signed-off-by: Gustavo F. Padovan --- Reading git-diff-tree failed