* [PATCH] RDMA/ocrdma: Fix potential EQ table leak
@ 2026-11-12 13:59 Guangshuo Li
2026-11-12 14:10 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-11-12 13:59 UTC (permalink / raw)
To: Selvin Xavier, Jason Gunthorpe, Leon Romanovsky; +Cc: linux-rdma, linux-kernel
EQ teardown destroys the individual queues but leaves their dynamically
allocated table behind. Free the table after all EQs have been destroyed
and reset its pointer and count.
This issue was found by our static analysis tool under development.
Fixes: fe2caefcdf58 ("RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 006ef2e6b5f3..4a977281a85b 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -518,6 +518,9 @@ static void ocrdma_destroy_eqs(struct ocrdma_dev *dev)
for (i = 0; i < dev->eq_cnt; i++)
ocrdma_destroy_eq(dev, &dev->eq_tbl[i]);
+ kfree(dev->eq_tbl);
+ dev->eq_tbl = NULL;
+ dev->eq_cnt = 0;
}
static int ocrdma_mbx_mq_cq_create(struct ocrdma_dev *dev,
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-12 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 13:59 [PATCH] RDMA/ocrdma: Fix potential EQ table leak Guangshuo Li
2026-11-12 14:10 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.