netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	pavan.chebbi@broadcom.com, ap420073@gmail.com
Subject: Re: [PATCH net-next 2/6] net: provide pending ring configuration in net_device
Date: Fri, 17 Jan 2025 14:18:33 -0800	[thread overview]
Message-ID: <20250117141833.7d8b519e@kernel.org> (raw)
In-Reply-To: <CACKFLinRxGgrgz8LUROsK0O+KTk=4a2B=mF-b2269JU+CigFPQ@mail.gmail.com>

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

  reply	other threads:[~2025-01-17 22:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-17 19:48 [PATCH net-next 0/6] net: ethtool: fixes for HDS threshold Jakub Kicinski
2025-01-17 19:48 ` [PATCH net-next 1/6] net: move HDS config from ethtool state Jakub Kicinski
2025-01-17 19:48 ` [PATCH net-next 2/6] net: provide pending ring configuration in net_device Jakub Kicinski
2025-01-17 22:07   ` Michael Chan
2025-01-17 22:18     ` Jakub Kicinski [this message]
2025-01-17 19:48 ` [PATCH net-next 3/6] eth: bnxt: apply hds_thrs settings correctly Jakub Kicinski
2025-01-17 19:48 ` [PATCH net-next 4/6] net: ethtool: populate the default HDS params in the core Jakub Kicinski
2025-01-17 19:48 ` [PATCH net-next 5/6] eth: bnxt: allocate enough buffer space to meet HDS threshold Jakub Kicinski
2025-01-17 19:48 ` [PATCH net-next 6/6] eth: bnxt: update header sizing defaults Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250117141833.7d8b519e@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).