lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] RDMA/qedr: Fix potential memory leak in __qedr_alloc_mr()
On Thu, Jul 14, 2022 at 02:15:05PM +0800, Jianglei Nie wrote:
> __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.
>
> Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>

Added fixes line.
Fixes: e0290cce6ac0 ("qedr: Add support for memory registeration verbs")

Thanks, applied.

\
 
 \ /
  Last update: 2022-07-18 13:05    [W:0.177 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site