aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorJianglei Nie <niejianglei2021@163.com>2022-07-14 14:15:05 +0800
committerLeon Romanovsky <leonro@nvidia.com>2022-07-18 14:16:10 +0300
commitb3236a64ddd125a455ef5b5316c1b9051b732974 (patch)
treea9dcab9a21f1dddfa4e8f13e377b53b82e698e68 /drivers/infiniband/hw/hns
parentRDMA/hfi1: Depend on !UML (diff)
downloadlinux-dev-b3236a64ddd125a455ef5b5316c1b9051b732974.tar.xz
linux-dev-b3236a64ddd125a455ef5b5316c1b9051b732974.zip
RDMA/qedr: Fix potential memory leak in __qedr_alloc_mr()
__qedr_alloc_mr() allocates a memory chunk for "mr->info.pbl_table" with init_mr_info(). When rdma_alloc_tid() and rdma_register_tid() fail, "mr" is released while "mr->info.pbl_table" is not released, which will lead to a memory leak. We should release the "mr->info.pbl_table" with qedr_free_pbl() when error occurs to fix the memory leak. Fixes: e0290cce6ac0 ("qedr: Add support for memory registeration verbs") Link: https://lore.kernel.org/r/20220714061505.2342759-1-niejianglei2021@163.com Signed-off-by: Jianglei Nie <niejianglei2021@163.com> Acked-by: Michal KalderonĀ <michal.kalderon@marvell.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hns')
0 files changed, 0 insertions, 0 deletions