Skip to content

Commit dafb52b

Browse files
committed
RDMA/bnxt_re: Fix the locking while accessing the QP table
JIRA: https://issues.redhat.com/browse/RHEL-74367 commit 9272cba Author: Selvin Xavier <selvin.xavier@broadcom.com> Date: Tue Dec 17 15:56:49 2024 +0530 RDMA/bnxt_re: Fix the locking while accessing the QP table 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: 76d3ddf ("RDMA/bnxt_re: synchronize the qp-handle table array") Fixes: f218d67 ("RDMA/bnxt_re: Allow posting when QPs are in error") Fixes: 84cf229 ("RDMA/bnxt_re: Fix the qp table indexing") Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/20241217102649.1377704-6-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Mohammad Heib <mheib@redhat.com>
1 parent ff8fd8d commit dafb52b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/infiniband/hw/bnxt_re/qplib_fp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,9 +1175,11 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
11751175
rq->dbinfo.db = qp->dpi->dbr;
11761176
rq->dbinfo.max_slot = bnxt_qplib_set_rq_max_slot(rq->wqe_size);
11771177
}
1178+
spin_lock_bh(&rcfw->tbl_lock);
11781179
tbl_indx = map_qp_id_to_tbl_indx(qp->id, rcfw);
11791180
rcfw->qp_tbl[tbl_indx].qp_id = qp->id;
11801181
rcfw->qp_tbl[tbl_indx].qp_handle = (void *)qp;
1182+
spin_unlock_bh(&rcfw->tbl_lock);
11811183

11821184
return 0;
11831185
fail:

0 commit comments

Comments
 (0)