Patch "RDMA/bnxt_re: Fix the locking while accessing the QP table" has been added to the 6.1-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/bnxt_re: Fix the locking while accessing the QP table

to the 6.1-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-bnxt_re-fix-the-locking-while-accessing-the-qp-.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 95bb297f46515405dd1ed0a3fcc456775cf41c72
Author: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
Date:   Tue Dec 17 15:56:49 2024 +0530

    RDMA/bnxt_re: Fix the locking while accessing the QP table
    
    [ Upstream commit 9272cba0ded71b5a2084da3004ec7806b8cb7fd2 ]
    
    QP table handling is synchronized with destroy QP and Async
    event from the HW. The same needs to be synchronized
    during create_qp also. Use the same lock in create_qp also.
    
    Fixes: 76d3ddff7153 ("RDMA/bnxt_re: synchronize the qp-handle table array")
    Fixes: f218d67ef004 ("RDMA/bnxt_re: Allow posting when QPs are in error")
    Fixes: 84cf229f4001 ("RDMA/bnxt_re: Fix the qp table indexing")
    Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
    Link: https://patch.msgid.link/20241217102649.1377704-6-kalesh-anakkur.purayil@xxxxxxxxxxxx
    Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index 7bd7ac8d52e6..23f9a48828dc 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -1149,9 +1149,11 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
 		rq->dbinfo.db = qp->dpi->dbr;
 		rq->dbinfo.max_slot = bnxt_qplib_set_rq_max_slot(rq->wqe_size);
 	}
+	spin_lock_bh(&rcfw->tbl_lock);
 	tbl_indx = map_qp_id_to_tbl_indx(qp->id, rcfw);
 	rcfw->qp_tbl[tbl_indx].qp_id = qp->id;
 	rcfw->qp_tbl[tbl_indx].qp_handle = (void *)qp;
+	spin_unlock_bh(&rcfw->tbl_lock);
 
 	return 0;
 fail:




[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