]> www.infradead.org Git - users/dwmw2/linux.git/commit
RDMA/bnxt_re: synchronize the qp-handle table array
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 14 Oct 2024 13:36:15 +0000 (06:36 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 21 Oct 2024 16:28:15 +0000 (13:28 -0300)
commit76d3ddff7153cc0bcc14a63798d19f5d0693ea71
tree7013838c7b9b64070020d164719b2c7675a68eae
parentd71f4acd584cc861f54b3cb3ac07875f06550a05
RDMA/bnxt_re: synchronize the qp-handle table array

There is a race between the CREQ tasklet and destroy qp when accessing the
qp-handle table. There is a chance of reading a valid qp-handle in the
CREQ tasklet handler while the QP is already moving ahead with the
destruction.

Fixing this race by implementing a table-lock to synchronize the access.

Fixes: f218d67ef004 ("RDMA/bnxt_re: Allow posting when QPs are in error")
Fixes: 84cf229f4001 ("RDMA/bnxt_re: Fix the qp table indexing")
Link: https://patch.msgid.link/r/1728912975-19346-3-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h