netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	David Ahern <dsahern@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Eric Dumazet <eric.dumazet@gmail.com>,
	kuniyu@amazon.co.jp, ushankar@purestorage.com,
	Kuniyuki Iwashima <kuniyu@amazon.com>
Subject: Re: [PATCH net v4 2/2] arp: switch to dev_getbyhwaddr() in arp_req_set_public()
Date: Tue, 18 Feb 2025 06:29:20 -0800	[thread overview]
Message-ID: <20250218062920.40aaaa6a@kernel.org> (raw)
In-Reply-To: <20250218-debonair-smoky-sparrow-97e07f@leitao>

On Tue, 18 Feb 2025 01:36:30 -0800 Breno Leitao wrote:
> On Mon, Feb 17, 2025 at 04:33:44PM -0800, Jakub Kicinski wrote:
> > On Thu, 13 Feb 2025 04:42:38 -0800 Breno Leitao wrote:  
> > > The arp_req_set_public() function is called with the rtnl lock held,
> > > which provides enough synchronization protection. This makes the RCU
> > > variant of dev_getbyhwaddr() unnecessary. Switch to using the simpler
> > > dev_getbyhwaddr() function since we already have the required rtnl
> > > locking.
> > > 
> > > This change helps maintain consistency in the networking code by using
> > > the appropriate helper function for the existing locking context.  
> > 
> > I think you should make it clearer whether this fixes a splat with
> > PROVE_RCU_LIST=y  
> 
> This one doesn't fix the splat in fact, since rtnl lock was held, and it
> is moving from dev_getbyhwaddr_rcu() to dev_getbyhwaddr(), since rtnl
> lock was held.

Are you sure? I don't see the RCU lock being taken on the path that
ends up here. arp_ioctl() -> arp_req_set() -> arp_req_set_public()

  reply	other threads:[~2025-02-18 14:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 12:42 [PATCH net v4 0/2] net: core: improvements to device lookup by hardware address Breno Leitao
2025-02-13 12:42 ` [PATCH net v4 1/2] net: Add non-RCU dev_getbyhwaddr() helper Breno Leitao
2025-02-14  5:49   ` Kuniyuki Iwashima
2025-02-18  0:32   ` Jakub Kicinski
2025-02-13 12:42 ` [PATCH net v4 2/2] arp: switch to dev_getbyhwaddr() in arp_req_set_public() Breno Leitao
2025-02-18  0:33   ` Jakub Kicinski
2025-02-18  9:36     ` Breno Leitao
2025-02-18 14:29       ` Jakub Kicinski [this message]
2025-02-18 16:27         ` Breno Leitao

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=20250218062920.40aaaa6a@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuniyu@amazon.co.jp \
    --cc=kuniyu@amazon.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ushankar@purestorage.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).