[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <777db8bb-89d2-46ac-b7b9-0b5f418cc716@web.de>
Date: Tue, 15 Apr 2025 09:32:07 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: 990492108@...com, Abdun Nihaal <abdun.nihaal@...il.com>,
netdev@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
Bharat Bhushan <bbhushan2@...vell.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Geethasowjanya Akula <gakula@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>,
Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [Patch next] octeontx2-pf: fix potential double free in
rvu_rep_create()
…
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
…
> > @@ -691,7 +690,6 @@ int rvu_rep_create(struct otx2_nic *priv, struct netlink_ext_ack *extack)
> > NL_SET_ERR_MSG_MOD(extack,
> > "PFVF representor registration failed");
> > rvu_rep_devlink_port_unregister(rep);
> > - free_netdev(ndev);
> > goto exit;
> > }
>
> There is no potential double free here. If you notice the loop at the
…
> (De)allocations in loops are quite tricky.
>
> Nacked-by: Abdun Nihaal <abdun.nihaal@...il.com>
Would you ever become interested to avoid a duplicate free_netdev(ndev) call
by using an additional label instead?
See also:
[PATCH net v2 1/2] octeontx2-pf: fix netdev memory leak in rvu_rep_create()
https://lore.kernel.org/netdev/8d54b21b-7ca9-4126-ba13-bbd333d6ba0c@web.de/
Regards,
Markus
Powered by blists - more mailing lists