[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250516201711.GK3339421@horms.kernel.org>
Date: Fri, 16 May 2025 21:17:11 +0100
From: Simon Horman <horms@...nel.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 1/4] net: airoha: Fix an error handling path in
airoha_alloc_gdm_port()
On Thu, May 15, 2025 at 11:16:56PM +0200, Lorenzo Bianconi wrote:
> > If register_netdev() fails, the error handling path of the probe will not
> > free the memory allocated by the previous airoha_metadata_dst_alloc() call
> > because port->dev->reg_state will not be NETREG_REGISTERED.
> >
> > So, an explicit airoha_metadata_dst_free() call is needed in this case to
> > avoid a memory leak.
> >
> > Fixes: af3cf757d5c9 ("net: airoha: Move DSA tag in DMA descriptor")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
>
> Acked-by: Lorenzo Bianconi <lorenzo@...nel.org>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists