]> www.infradead.org Git - users/hch/dma-mapping.git/commit
driver core: fix async device shutdown hang
authorStuart Hayes <stuart.w.hayes@gmail.com>
Thu, 19 Sep 2024 04:31:43 +0000 (23:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2024 09:14:52 +0000 (11:14 +0200)
commit4f2c346e621624315e2a1405e98616a0c5ac146f
tree2d0ee10568977846fe3d93465760d01b009a9fec
parent6a36d828bdef0e02b1e6c12e2160f5b83be6aab5
driver core: fix async device shutdown hang

Modify device_shutdown() so that supplier devices do not wait for
consumer devices to be shut down first when the devlink is sync state
only, since the consumer is not dependent on the supplier in this case.

Without this change, a circular dependency could hang the system.

Fixes: 8064952c6504 ("driver core: shut down devices asynchronously")
Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20240919043143.1194950-1-stuart.w.hayes@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c