[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec570c6f8c041f60f1de0b002e61e5a2971633c5.camel@gmail.com>
Date: Wed, 03 Dec 2025 01:17:13 +0530
From: ally heev <allyheev@...il.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>, Przemek Kitszel
<przemyslaw.kitszel@...el.com>, 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>, Alexander
Lobakin <aleksander.lobakin@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Simon Horman <horms@...nel.org>, Dan
Carpenter <dan.carpenter@...aro.org>
Subject: Re: [RFT net-next PATCH RESEND 0/2] ethernet: intel: fix freeing
uninitialized pointers with __free
On Mon, 2025-12-01 at 13:40 -0800, Tony Nguyen wrote:
>
> On 11/23/2025 11:40 PM, Ally Heev wrote:
> > Uninitialized pointers with `__free` attribute can cause undefined
> > behavior as the memory assigned randomly to the pointer is freed
> > automatically when the pointer goes out of scope.
> >
> > We could just fix it by initializing the pointer to NULL, but, as usage of
> > cleanup attributes is discouraged in net [1], trying to achieve cleanup
> > using goto
>
> These two drivers already have multiple other usages of this. All the
> other instances initialize to NULL; I'd prefer to see this do the same
> over changing this single instance.
>
Other usages are slightly complicated to be refactored and might need
good testing. Do you want me to do it in a different series?
Regards,
Ally
Powered by blists - more mailing lists