]> git.ipfire.org Git - people/arne_f/kernel.git/commit
p54spi: Fix workqueue deadlock
authorMichael Büsch <m@bues.ch>
Wed, 16 Nov 2011 22:55:46 +0000 (23:55 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 16 Jan 2013 21:44:58 +0000 (16:44 -0500)
commit89b56467c5ee10ab80c44aa1fe03d461deaf0c92
tree8c6ee3a3d71d03c627ebec7bc64dcb4fa5a4fb03
parent94bad843f7453e4353703fb4b75afde2fdeb3425
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: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/wireless/p54/p54spi.c