Skip to content

Commit fcd431a

Browse files
Thomas-fourierrleon
authored andcommitted
RDMA/bnxt_re: fix dma_free_coherent() pointer
The dma_alloc_coherent() allocates a dma-mapped buffer, pbl->pg_arr[i]. The dma_free_coherent() should pass the same buffer to dma_free_coherent() and not page-aligned. Fixes: 1ac5a40 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Link: https://patch.msgid.link/20251230085121.8023-2-fourier.thomas@gmail.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 43bd09d commit fcd431a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/infiniband/hw/bnxt_re/qplib_res.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ static void __free_pbl(struct bnxt_qplib_res *res, struct bnxt_qplib_pbl *pbl,
6464
for (i = 0; i < pbl->pg_count; i++) {
6565
if (pbl->pg_arr[i])
6666
dma_free_coherent(&pdev->dev, pbl->pg_size,
67-
(void *)((unsigned long)
68-
pbl->pg_arr[i] &
69-
PAGE_MASK),
67+
pbl->pg_arr[i],
7068
pbl->pg_map_arr[i]);
7169
else
7270
dev_warn(&pdev->dev,

0 commit comments

Comments
 (0)