From: Breno Leitao <leitao@debian.org>
To: Michal Kubiak <michal.kubiak@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
Stephen Hemminger <stephen@networkplumber.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
paulmck@kernel.org
Subject: Re: [PATCH net 2/2] netpoll: Use rcu_access_pointer() in netpoll_poll_lock
Date: Mon, 18 Nov 2024 07:37:43 -0800 [thread overview]
Message-ID: <20241118-bipedal-beryl-peccary-ed32da@leitao> (raw)
In-Reply-To: <ZzsxDhFqALWCojNb@localhost.localdomain>
On Mon, Nov 18, 2024 at 01:20:30PM +0100, Michal Kubiak wrote:
> On Mon, Nov 18, 2024 at 03:15:18AM -0800, Breno Leitao wrote:
> > The ndev->npinfo pointer in netpoll_poll_lock() is RCU-protected but is
> > being accessed directly for a NULL check. While no RCU read lock is held
> > in this context, we should still use proper RCU primitives for
> > consistency and correctness.
> >
> > Replace the direct NULL check with rcu_access_pointer(), which is the
> > appropriate primitive when only checking for NULL without dereferencing
> > the pointer. This function provides the necessary ordering guarantees
> > without requiring RCU read-side protection.
> >
> > Signed-off-by: Breno Leitao <leitao@debian.org>
> > Fixes: bea3348eef27 ("[NET]: Make NAPI polling independent of struct net_device objects.")
>
> nitpick: As for the first patch - please check the tags order.
>
> Thanks,
> Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Thanks for the review.
I am not planning to resend it now, since I think maintainer's tooling will
reorder that.
If that is not true, I am more than happy to resend fixing the order.
Thanks
Breno
next prev parent reply other threads:[~2024-11-18 15:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 11:15 [PATCH net 0/2] netpoll: Use RCU primitives for npinfo pointer access Breno Leitao
2024-11-18 11:15 ` [PATCH net 1/2] netpoll: Use rcu_access_pointer() in __netpoll_setup Breno Leitao
2024-11-18 12:18 ` Michal Kubiak
2024-11-19 3:28 ` Herbert Xu
2024-11-19 10:22 ` Breno Leitao
2024-11-20 3:01 ` Herbert Xu
2024-11-20 3:48 ` Herbert Xu
2024-11-20 17:58 ` Breno Leitao
2024-11-18 11:15 ` [PATCH net 2/2] netpoll: Use rcu_access_pointer() in netpoll_poll_lock Breno Leitao
2024-11-18 12:20 ` Michal Kubiak
2024-11-18 15:37 ` Breno Leitao [this message]
2024-11-19 3:02 ` Jakub Kicinski
2024-11-19 3:48 ` Herbert Xu
2024-11-19 3:40 ` [PATCH net 0/2] netpoll: Use RCU primitives for npinfo pointer access patchwork-bot+netdevbpf
2024-11-19 3:53 ` Herbert Xu
2024-11-19 14:34 ` 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=20241118-bipedal-beryl-peccary-ed32da@leitao \
--to=leitao@debian.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulmck@kernel.org \
--cc=stephen@networkplumber.org \
/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