[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250117141833.7d8b519e@kernel.org>
Date: Fri, 17 Jan 2025 14:18:33 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Michael Chan <michael.chan@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
pavan.chebbi@...adcom.com, ap420073@...il.com
Subject: Re: [PATCH net-next 2/6] net: provide pending ring configuration in
net_device
On Fri, 17 Jan 2025 14:07:03 -0800 Michael Chan wrote:
> > +out_tie_cfg:
> > + dev->cfg_pending = dev->cfg;
>
> If I understand this correctly, cfg_pending can momentarily point to
> the old cfg and freed memory before pointing to the new cfg outside of
> rtnl_lock. Shouldn't it be inside the rtnl_lock?
>
> In the bnxt patch, we now look at cfg_pending so it must always point
> to the correct cfg.
Good catch, I moved it out to avoid an allocation under rtnl_lock..
--
pw-bot: cr
Powered by blists - more mailing lists