Re: [PATCH v2] net: amd: Fix link leak when verifying config failed

From: Paolo Abeni
Date: Thu Apr 20 2023 - 04:41:03 EST


Hi,

On Wed, 2023-04-19 at 14:58 +0800, Gencen Gan wrote:
> From: Gan Gecen <gangecen@xxxxxxxxxxx>
>
> After failing to verify configuration, it returns directly without
> releasing link, which may cause memory leak.
>
> Signed-off-by: Gan Gecen <gangecen@xxxxxxxxxxx>

Please include a suitable Fixes tag and specify the target tree in the
subj - see the documentation for the details.

More importantly, skimming over the relevant code I think that at least
a netdev is still leaked in the relevant error path.

Generally speaking the whole code of this driver is quite "suboptimal"
and looks unmainatained since at least ~15y, just receiving tree-wide
related changes.

I'm wondering if we could simply remove the whole driver?

Thanks

Paolo