Skip to content

Commit 4405acf

Browse files
anprabhu78gregkh
authored andcommitted
RDMA/bnxt_re: Fix to initialize the PBL array
[ Upstream commit 806b9f4 ] memset the PBL page pointer and page map arrays before populating the SGL addresses of the HWQ. Fixes: 0c4dcd6 ("RDMA/bnxt_re: Refactor hardware queue memory allocation") Signed-off-by: Anantha Prabhu <[email protected]> Reviewed-by: Saravanan Vajravel <[email protected]> Reviewed-by: Selvin Xavier <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent eeaa057 commit 4405acf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/infiniband/hw/bnxt_re/qplib_res.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,15 @@ static int __alloc_pbl(struct bnxt_qplib_res *res,
121121
pbl->pg_arr = vmalloc_array(pages, sizeof(void *));
122122
if (!pbl->pg_arr)
123123
return -ENOMEM;
124+
memset(pbl->pg_arr, 0, pages * sizeof(void *));
124125

125126
pbl->pg_map_arr = vmalloc_array(pages, sizeof(dma_addr_t));
126127
if (!pbl->pg_map_arr) {
127128
vfree(pbl->pg_arr);
128129
pbl->pg_arr = NULL;
129130
return -ENOMEM;
130131
}
132+
memset(pbl->pg_map_arr, 0, pages * sizeof(dma_addr_t));
131133
pbl->pg_count = 0;
132134
pbl->pg_size = sginfo->pgsize;
133135

0 commit comments

Comments
 (0)