* [PATCH] RDMA/ionic: unmap query QP buffers with their mapped size
@ 2026-12-01 9:35 Thomas Fourier
2026-12-01 9:45 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Fourier @ 2026-12-01 9:35 UTC (permalink / raw)
Cc: Thomas Fourier, Abhijit Gangurde, Allen Hubbe, Jason Gunthorpe,
Leon Romanovsky, Andrew Boyer, open list:AMD PENSANDO RDMA DRIVER
ionic_query_qp_cmd() maps query_sqbuf and query_rqbuf with PAGE_SIZE but
unmaps them with sizeof(*query_sqbuf) and sizeof(*query_rqbuf). This may
lead to leaving part of the buffer mapped.
Unmap both buffers with PAGE_SIZE.
Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/infiniband/hw/ionic/ionic_controlpath.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/ionic/ionic_controlpath.c b/drivers/infiniband/hw/ionic/ionic_controlpath.c
index e85c382f9140..a6f8699f8d2c 100644
--- a/drivers/infiniband/hw/ionic/ionic_controlpath.c
+++ b/drivers/infiniband/hw/ionic/ionic_controlpath.c
@@ -1801,10 +1801,10 @@ static int ionic_query_qp_cmd(struct ionic_ibdev *dev,
kfree(hdr_buf);
}
err_hdrbuf:
- dma_unmap_single(dev->lif_cfg.hwdev, query_rqdma, sizeof(*query_rqbuf),
+ dma_unmap_single(dev->lif_cfg.hwdev, query_rqdma, PAGE_SIZE,
DMA_FROM_DEVICE);
err_rqdma:
- dma_unmap_single(dev->lif_cfg.hwdev, query_sqdma, sizeof(*query_sqbuf),
+ dma_unmap_single(dev->lif_cfg.hwdev, query_sqdma, PAGE_SIZE,
DMA_FROM_DEVICE);
err_sqdma:
kfree(query_rqbuf);
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-01 9:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 9:35 [PATCH] RDMA/ionic: unmap query QP buffers with their mapped size Thomas Fourier
2026-12-01 9:45 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox