lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] RDMA/mlx5: Fix memory leak
On Fri, Mar 11, 2022 at 09:06:01AM -0800, Yongzhi Liu wrote:
> [why]
> xa_insert is failed, so caller of subscribe_event_xa_alloc
> cannot call other function to free obj_event. Therefore,
> Resource release is needed on the error handling path to
> prevent memory leak.
>
> [how]
> Fix this by adding kfree on the error handling path.
>
> Fixes: 7597385 ("IB/mlx5: Enable subscription for device events over DEVX")
>
> Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
> Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
> ---
> drivers/infiniband/hw/mlx5/devx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

Applied to for-next with Leon's commit message

Thanks,
Jason

\
 
 \ /
  Last update: 2022-03-15 00:46    [W:0.284 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site