Patch "RDMA/ib_srp: Fix a deadlock" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RDMA/ib_srp: Fix a deadlock

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-ib_srp-fix-a-deadlock.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a0c4a7b02ff52c0b45ce94b73313fd8f5411470a
Author: Bart Van Assche <bvanassche@xxxxxxx>
Date:   Tue Feb 15 13:05:11 2022 -0800

    RDMA/ib_srp: Fix a deadlock
    
    [ Upstream commit 081bdc9fe05bb23248f5effb6f811da3da4b8252 ]
    
    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@xxxxxxx
    Fixes: ef6c49d87c34 ("IB/srp: Eliminate state SRP_TARGET_DEAD")
    Reported-by: syzbot+831661966588c802aae9@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
    Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index af68be201c299..67b993f4ec91a 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -3646,9 +3646,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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux