linux_dsm_epyc7002/drivers/firewire
Stephan Gatzka db9ae8fec7 firewire: ohci: Fix deadlock at bus reset
Put bus_reset_work into its own workqueue.  By doing this, forward
progress of bus_reset_work() is guaranteed if the work is switched over
to a rescuer thread.

Switching work to a rescuer thread happens if a new worker thread could
not be allocated in certain time (MAYDAY_INITIAL_TIMEOUT, typically 10
ms).  This might not be possible under high memory pressure or even on a
heavily loaded embedded system running a slow serial console.

The former deadlock occured in the following situation:
The rescuer thread ran
fw_device_init->read_config_rom->read_rom->fw_run_transaction.
fw_run_transaction blocked waiting for the completion object.
This completion object would have been completed in bus_reset_work,
but this work was never executed in the rescuer thread due to its
strictly sequential behaviour.

[Stefan R.:  Removed WQ_NON_REENTRANT flag from allocation because
it is no longer needed in current kernels.  Add it back if you backport
to kernels older than 3.7, i.e. one which does not contain dbf2576e37
"workqueue: make all workqueues non-reentrant".  Swapped order of
destroy_workqueue and pci_unregister_driver.]

Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2013-08-29 22:35:05 +02:00
..
core-card.c
core-cdev.c firewire: core: typecast from gfp_t to bool more safely 2013-07-30 15:46:18 +02:00
core-device.c firewire: remove support of fw_driver.driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
core-iso.c
core-topology.c
core-transaction.c firewire: WQ_NON_REENTRANT is meaningless and going away 2013-07-30 15:46:18 +02:00
core.h
init_ohci1394_dma.c
Kconfig firewire net, ipv6: IPv6 over Firewire (RFC3146) support. 2013-03-26 12:32:13 -04:00
Makefile
net.c firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
nosy-user.h
nosy.c
nosy.h
ohci.c firewire: ohci: Fix deadlock at bus reset 2013-08-29 22:35:05 +02:00
ohci.h
sbp2.c firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00