netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Florian Westphal <fw@strlen.de>
Cc: Sabrina Dubroca <sd@queasysnail.net>, <netdev@vger.kernel.org>,
	"Antony Antony" <antony.antony@secunet.com>,
	Tobias Brunner <tobias@strongswan.org>
Subject: Re: [PATCH ipsec 2/2] xfrm: state: use a consistent pcpu_id in xfrm_state_find
Date: Mon, 26 May 2025 14:17:28 +0200	[thread overview]
Message-ID: <aDRb2MLYjHb4GbaO@gauss3.secunet.de> (raw)
In-Reply-To: <aDRzMLL1vMXOIgHf@strlen.de>

On Mon, May 26, 2025 at 03:57:04PM +0200, Florian Westphal wrote:
> Steffen Klassert <steffen.klassert@secunet.com> wrote:
> > > -	pcpu_id = get_cpu();
> > > -	put_cpu();
> > > +	pcpu_id = raw_smp_processor_id();
> > 
> > This codepath can be taken from the forwarding path with preemtion
> > disabled. raw_smp_processor_id will trigger a warning in that case,
> 
> Are you sure? smp_processor_id() emits a warning when called from
> preemptible context, raw_smp_processor_id() should not do that.
> 
> We use raw_smp_processor_id from various netfilter modules as well
> and I never saw preemption warnings.

You are right, I just saw smp_processor_id. Sorry for the noise!

  reply	other threads:[~2025-05-26 12:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23 15:11 [PATCH ipsec 0/2] xfrm: fixes for xfrm_state_find under preemption Sabrina Dubroca
2025-05-23 15:11 ` [PATCH ipsec 1/2] xfrm: state: initialize state_ptrs earlier in xfrm_state_find Sabrina Dubroca
2025-05-23 18:05   ` Florian Westphal
2025-05-23 15:11 ` [PATCH ipsec 2/2] xfrm: state: use a consistent pcpu_id " Sabrina Dubroca
2025-05-23 18:12   ` Florian Westphal
2025-05-26  6:28   ` Steffen Klassert
2025-05-26 13:57     ` Florian Westphal
2025-05-26 12:17       ` Steffen Klassert [this message]
2025-06-10  7:55 ` [PATCH ipsec 0/2] xfrm: fixes for xfrm_state_find under preemption Steffen Klassert

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=aDRb2MLYjHb4GbaO@gauss3.secunet.de \
    --to=steffen.klassert@secunet.com \
    --cc=antony.antony@secunet.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    --cc=tobias@strongswan.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;
as well as URLs for NNTP newsgroup(s).