linux/drivers/misc/mei
Alexander Usyskin e728ae271f mei: amthif: fix deadlock in initialization during a reset
The device lock was unnecessary obtained in bus rescan work before the
amthif client search.  That causes incorrect lock ordering and task
hang:
...
[88004.613213] INFO: task kworker/1:14:21832 blocked for more than 120 seconds.
...
[88004.645934] Workqueue: events mei_cl_bus_rescan_work
...

The correct lock order is
 cl_bus_lock
  device_lock
   me_clients_rwsem

Move device_lock into amthif init function that called
after me_clients_rwsem is released.

This fixes regression introduced by commit:
commit 025fb792ba ("mei: split amthif client init from end of clients enumeration")

Cc: <stable@vger.kernel.org> # 4.6+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-30 14:39:43 +02:00
..
amthif.c mei: amthif: fix deadlock in initialization during a reset 2016-08-30 14:39:43 +02:00
bus-fixup.c mei: drop reserved host client ids 2016-02-07 14:47:20 -08:00
bus.c mei: amthif: fix deadlock in initialization during a reset 2016-08-30 14:39:43 +02:00
client.c mei: amthif: drop mei_amthif_read 2016-08-30 14:39:42 +02:00
client.h mei: add wrapper for queuing control commands. 2016-08-30 14:39:42 +02:00
debugfs.c mei: hbm: send immediate reply flag in enum request 2016-02-07 14:47:20 -08:00
hbm.c mei: add wrapper for queuing control commands. 2016-08-30 14:39:42 +02:00
hbm.h mei: me: d0i3: add d0i3 enter/exit state machine 2015-08-03 17:33:55 -07:00
hw-me-regs.h mei: me: add broxton pci device ids 2016-03-01 16:53:32 -08:00
hw-me.c mei: recover after errors in runtime pm flow 2016-08-30 14:36:39 +02:00
hw-me.h mei: me: d0i3: enable d0i3 interrupts 2015-08-03 17:33:54 -07:00
hw-txe-regs.h mei: extract fw status registers 2014-05-03 19:21:22 -04:00
hw-txe.c mei: recover after errors in runtime pm flow 2016-08-30 14:36:39 +02:00
hw-txe.h mei: fix kernel-doc warnings 2014-09-29 11:56:02 -04:00
hw.h mei: hbm: send immediate reply flag in enum request 2016-02-07 14:47:20 -08:00
init.c mei: split amthif client init from end of clients enumeration 2016-02-07 14:47:20 -08:00
interrupt.c mei: enqueue consecutive reads 2016-08-30 14:39:42 +02:00
Kconfig mei: wd: drop the watchdog code from the core mei driver 2016-02-06 22:11:06 -08:00
main.c mei: amthif: drop mei_amthif_read 2016-08-30 14:39:42 +02:00
Makefile mei: wd: drop the watchdog code from the core mei driver 2016-02-06 22:11:06 -08:00
mei_dev.h mei: drop unused file transaction states 2016-08-30 14:39:42 +02:00
mei-trace.c mei: trace pci configuration space io 2016-02-07 13:00:52 -08:00
mei-trace.h mei: drop superfluous closing bracket from write traces 2016-02-07 14:47:20 -08:00
pci-me.c mei: recover after errors in runtime pm flow 2016-08-30 14:36:39 +02:00
pci-txe.c mei: recover after errors in runtime pm flow 2016-08-30 14:36:39 +02:00