From: Jakub Kicinski <kuba@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, stable@vger.kernel.org, jdamato@fastly.com,
almasrymina@google.com, amritha.nambiar@intel.com,
sridhar.samudrala@intel.com
Subject: Re: [PATCH net] netdev: prevent accessing NAPI instances from another namespace
Date: Tue, 7 Jan 2025 08:36:09 -0800 [thread overview]
Message-ID: <20250107083609.55ddf0d6@kernel.org> (raw)
In-Reply-To: <677d27cc5d9b_25382b294fd@willemb.c.googlers.com.notmuch>
On Tue, 07 Jan 2025 08:10:36 -0500 Willem de Bruijn wrote:
> > +/* must be called under rcu_read_lock(), as we dont take a reference */
>
> Instead of function comments, invariant checks in code?
>
> Like in dev_get_by_napi_id:
>
> WARN_ON_ONCE(!rcu_read_lock_held());
Can I do it as a follow up? Adding the warning to napi_by_id()
reveals that napi_hash_add() currently walks the list without
holding the RCU lock :)
next prev parent reply other threads:[~2025-01-07 16:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 18:01 [PATCH net] netdev: prevent accessing NAPI instances from another namespace Jakub Kicinski
2025-01-07 5:30 ` Samudrala, Sridhar
2025-01-07 13:10 ` Willem de Bruijn
2025-01-07 16:36 ` Jakub Kicinski [this message]
2025-01-07 20:31 ` Willem de Bruijn
2025-01-08 17:24 ` Joe Damato
2025-01-08 19:20 ` patchwork-bot+netdevbpf
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=20250107083609.55ddf0d6@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=amritha.nambiar@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sridhar.samudrala@intel.com \
--cc=stable@vger.kernel.org \
--cc=willemdebruijn.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.