Re: [PATCH] RDMA/nldev: Fix ib_device reference leak in nldev_dellink()
From: Leon Romanovsky
Date: Wed Sep 23 2026 - 04:41:17 EST
On Wed, Sep 16, 2026 at 06:31:01PM +0000, Wentao Liang wrote:
> nldev_dellink() takes a reference on the ib_device with
> ib_device_get_by_index(). When the driver's dellink callback fails,
> the function returns the error directly without dropping that
> reference, leaking it. Call ib_device_put() on the dellink error
> path before returning, matching the handling of the other error
> exits in this function.
>
> Fixes: a60e3f3d6fba ("RDMA/nldev: Add dellink function pointer")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
> drivers/infiniband/core/nldev.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
It was already fixed, https://patch.msgid.link/20260903082550.2257-1-lirongqing@xxxxxxxxx
Thanks