]> www.infradead.org Git - users/jedix/linux-maple.git/commit
p54spi: Fix workqueue deadlock
authorMichael Büsch <m@bues.ch>
Wed, 16 Nov 2011 22:55:46 +0000 (23:55 +0100)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 16 Dec 2011 01:14:26 +0000 (17:14 -0800)
commit4b8366c92971c9eff8648845bbb6ea4ef7d5ca77
treea0af100ef1bde6737bbd7c837af3d49a21a620ed
parent2e0c2d9f855f1ff432a97be00269d3f9ebc05ce0
p54spi: Fix workqueue deadlock

commit 2d1618170eb493d18f66f2ac03775409a6fb97c6 upstream.

priv->work must not be synced while priv->mutex is locked, because
the mutex is taken in the work handler.
Move cancel_work_sync down to after the device shutdown code.
This is safe, because the work handler checks fw_state and bails out
early in case of a race.

Signed-off-by: Michael Buesch <m@bues.ch>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/p54/p54spi.c