mirror of
https://github.com/torvalds/linux
synced 2024-10-04 02:10:58 +00:00
RDMA/ib_srp: Fix a deadlock
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: ef6c49d87c
("IB/srp: Eliminate state SRP_TARGET_DEAD")
Reported-by: syzbot+831661966588c802aae9@syzkaller.appspotmail.com
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
c46fa8911b
commit
081bdc9fe0
|
@ -4047,9 +4047,11 @@ static void srp_remove_one(struct ib_device *device, void *client_data)
|
|||
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);
|
||||
|
||||
kfree(host);
|
||||
|
|
Loading…
Reference in a new issue