]> git.baikalelectronics.ru Git - kernel.git/commit
mei: nfc: fix deadlock on shutdown/suspend path
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 7 Jul 2015 21:22:03 +0000 (00:22 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Jul 2015 22:04:12 +0000 (15:04 -0700)
commitd587d5c57e96294edf1a626dab852205d810af6b
tree384abc27b134c3570ad8bcc7b6461e4128e7ed6a
parent420fdd13b27d197155dbbd7f16967aa66b9dbd5a
mei: nfc: fix deadlock on shutdown/suspend path

In function mei_nfc_host_exit mei_cl_remove_device cannot be called
under the device mutex as device removing flow invokes the device driver
remove handler that calls in turn to mei_cl_disable_device which
naturally acquires the device mutex.

Also remove mei_cl_bus_remove_devices which has the same issue, but is
never executed as currently the only device on the mei client bus is NFC
and a new device cannot be easily added till the bus revamp is
completed.

This fixes regression caused by commit d6118565d5b9 ("mei_phy: move all
nfc logic from mei driver to nfc")

Prior to this change the nfc driver remove handler called to no-op
disable function while actual nfc device was disabled directly from the
mei driver.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/mei/bus.c
drivers/misc/mei/init.c
drivers/misc/mei/nfc.c