Re: [PATCH 2/2] octeontx2-pf: fix bitmap leak

From: Simon Horman

Date: Mon Sep 29 2025 - 06:12:05 EST


On Sat, Sep 27, 2025 at 03:15:05PM +0800, Bo Sun wrote:
> The bitmap allocated with bitmap_zalloc() in otx2_probe() was not
> released in otx2_remove(). Unbinding and rebinding the driver therefore
> triggers a kmemleak warning:
>
> unreferenced object (size 8):
> backtrace:
> bitmap_zalloc
> otx2_probe
>
> Call bitmap_free() in the remove path to fix the leak.
>
> Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Bo Sun <bo@xxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>