]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bas_gigaset: fix pre_reset handling
authorTilman Schmidt <tilman@imap.cc>
Wed, 24 Oct 2012 08:44:32 +0000 (08:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Dec 2012 20:59:15 +0000 (12:59 -0800)
commit346f8559c5f91ce2d2e701c401008f7ff646d1c0
tree721519dbbccefc5742d5ebeb89c690ff28bbf0f4
parentbbc0a1873216ae9b68753e49fefcc58a271e8329
bas_gigaset: fix pre_reset handling

commit c6fdd8e5d0c65bb8821dc6da26ee1a2ddd58b3cc upstream.

The delayed work function int_in_work() may call usb_reset_device()
and thus, indirectly, the driver's pre_reset method. Trying to
cancel the work synchronously in that situation would deadlock.
Fix by avoiding cancel_work_sync() in the pre_reset method.

If the reset was NOT initiated by int_in_work() this might cause
int_in_work() to run after the post_reset method, with urb_int_in
already resubmitted, so handle that case gracefully.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/isdn/gigaset/bas-gigaset.c