Re: [PATCH 2/3] net: marvell: prestera: fix memory use after free

From: Kory Maincent
Date: Tue Mar 12 2024 - 11:45:42 EST


On Mon, 11 Mar 2024 15:51:11 +0200
Elad Nachman <enachman@xxxxxxxxxxx> wrote:

> From: Elad Nachman <enachman@xxxxxxxxxxx>
>
> Prestera driver routing module cleanup process would
> release memory and then reference it again, and eventually
> free it again.
> Remove the redundant first memory free call.
> All such double free calls were detected using KASAN.

Not directly related to this patch but I am wondering if
the call to prestera_port_sfp_unbind(port) is not missing in
prestera_destroy_ports() function?

Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com