Re: [PATCH net] ax25: Replace kfree() in ax25_dev_free() with ax25_dev_put()

From: Dan Carpenter
Date: Thu May 30 2024 - 01:23:37 EST


On Thu, May 30, 2024 at 01:17:33PM +0800, Duoming Zhou wrote:
> The object "ax25_dev" is managed by reference counting. Thus it should
> not be directly released by kfree(), replace with ax25_dev_put().
>
> Fixes: d01ffb9eee4a ("ax25: add refcount in ax25_dev to avoid UAF bugs")
> Suggested-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Duoming Zhou <duoming@xxxxxxxxxx>

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter