提交 880991de 编写于 作者: B Bart Van Assche 提交者: Zheng Zengkai

RDMA/ib_srp: Fix a deadlock

stable inclusion
from stable-v5.10.103
commit 99eb8d694174c777558dc902d575d1997d5ca650
bugzilla: https://gitee.com/openeuler/kernel/issues/I56NE7

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=99eb8d694174c777558dc902d575d1997d5ca650

--------------------------------

[ Upstream commit 081bdc9f ]

Remove the flush_workqueue(system_long_wq) call since flushing
system_long_wq is deadlock-prone and since that call is redundant with a
preceding cancel_work_sync()

Link: https://lore.kernel.org/r/20220215210511.28303-3-bvanassche@acm.org
Fixes: ef6c49d8 ("IB/srp: Eliminate state SRP_TARGET_DEAD")
Reported-by: syzbot+831661966588c802aae9@syzkaller.appspotmail.com
Signed-off-by: NBart Van Assche <bvanassche@acm.org>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c234e4b4
...@@ -4045,9 +4045,11 @@ static void srp_remove_one(struct ib_device *device, void *client_data) ...@@ -4045,9 +4045,11 @@ static void srp_remove_one(struct ib_device *device, void *client_data)
spin_unlock(&host->target_lock); spin_unlock(&host->target_lock);
/* /*
* Wait for tl_err and target port removal tasks. * srp_queue_remove_work() queues a call to
* srp_remove_target(). The latter function cancels
* target->tl_err_work so waiting for the remove works to
* finish is sufficient.
*/ */
flush_workqueue(system_long_wq);
flush_workqueue(srp_remove_wq); flush_workqueue(srp_remove_wq);
kfree(host); kfree(host);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册