]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix possible deadlock when nvme_update_formats fails
authorSagi Grimberg <sagi@grimberg.me>
Wed, 2 Oct 2019 17:52:25 +0000 (10:52 -0700)
committerSagi Grimberg <sagi@grimberg.me>
Sat, 5 Oct 2019 00:10:12 +0000 (17:10 -0700)
commitf087d2552b73005dc79d8df72308b91414c40060
treed1329827ab7e23a19d126e6b8a28148ade259d66
parent4541f4968fb622a705490da62d6aaf1f808fe3c2
nvme: fix possible deadlock when nvme_update_formats fails

nvme_update_formats may fail to revalidate the namespace and
attempt to remove the namespace. This may lead to a deadlock
as nvme_ns_remove will attempt to acquire the subsystem lock
which is already acquired by the passthru command with effects.

Move the invalid namepsace removal to after the passthru command
releases the subsystem lock.

Reported-by: Judy Brock <judy.brock@samsung.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c