Re: [PATCH rdma-next 3/6] RDMA/mlx5: Fix ucaps init error flow
From: Kalesh Anakkur Purayil
Date: Sun Jan 04 2026 - 22:38:04 EST
On Sun, Jan 4, 2026 at 7:22 PM Leon Romanovsky <leon@xxxxxxxxxx> wrote:
>
> From: Maher Sanalla <msanalla@xxxxxxxxxx>
>
> In mlx5_ib_stage_caps_init(), if mlx5_ib_init_ucaps() fails after
> mlx5_ib_init_var_table() succeeds, the VAR bitmap is leaked since
> the function returns without cleanup.
>
> Thus, cleanup the var table bitmap in case of error of initializing
> ucaps before exiting, preventing the leak above.
>
> Fixes: cf7174e8982f ("RDMA/mlx5: Create UCAP char devices for supported device capabilities")
> Signed-off-by: Maher Sanalla <msanalla@xxxxxxxxxx>
> Reviewed-by: Yishai Hadas <yishaih@xxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@xxxxxxxxxxxx>
--
Regards,
Kalesh AP
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature