nvme: fix possible deadlock when nvme_update_formats fails
mainline inclusion from mainline-5.4-rc4 commit 6abff1b9f7b8884a46b7bd80b49e7af0b5625aeb category: bugfix bugzilla: 24170 CVE: NA --------------------------- 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: NJudy Brock <judy.brock@samsung.com> Signed-off-by: NSagi Grimberg <sagi@grimberg.me> Signed-off-by: NSun Ke <sunke32@huawei.com> Reviewed-by: NHou Tao <houtao1@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录