Commit 1993519
bnxt_re: Fix memory leak in FRMR path
This patch fixes a memory leak issue when alloc_mr is used.
mr->pages and mr->npages are used only in alloc_mr path. mr->pages
is allocated when alloc_mr is called or in the case of FRMR, while
creating the MR. mr->npages is updated only when the MR created
is used i.e. after invoking map_mr_sg verb, before data transfer.
In the dereg_mr path, if mr->npages is 0, driver ends up not freeing
the memory created.
Removing the npages check from the dereg_mr path for kernel consumers.
Signed-off-by: Selvin Xavier <[email protected]>
Signed-off-by: Somnath Kotur <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>1 parent 74828b1 commit 1993519
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3066 | 3066 | | |
3067 | 3067 | | |
3068 | 3068 | | |
3069 | | - | |
| 3069 | + | |
3070 | 3070 | | |
3071 | 3071 | | |
3072 | 3072 | | |
| |||
0 commit comments