aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/altera-fpga2sdram.c
diff options
context:
space:
mode:
authorSelvin Xavier <[email protected]>2017-08-31 03:57:34 +0000
committerDoug Ledford <[email protected]>2017-09-22 17:57:33 +0000
commit1993519be8bc86342687c61d8d11c3ade62b3b84 (patch)
treedb6cbdbbb27b17c695418327fea93e00b934a15f /drivers/fpga/altera-fpga2sdram.c
parentbnxt_re: Remove RTNL lock dependency in bnxt_re_query_port (diff)
downloadkernel-1993519be8bc86342687c61d8d11c3ade62b3b84.tar.gz
kernel-1993519be8bc86342687c61d8d11c3ade62b3b84.zip
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]>
Diffstat (limited to 'drivers/fpga/altera-fpga2sdram.c')
0 files changed, 0 insertions, 0 deletions