All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] seqlock, procfs: Fix scoped_seqlock_read() critical section in do_task_stat()
Date: Tue, 2 Dec 2025 08:29:35 +0100	[thread overview]
Message-ID: <aS6VX56DuPWY3bXk@redhat.com> (raw)
In-Reply-To: <aS5mdHYhHi9Gi5-r@gmail.com>

On 12/02, Ingo Molnar wrote:
>
> RCU read-lock should not nest inside a read-seqlock
> irqsave ->stats_lock IRQs-off critical section,

Hmm... I agree with this patch, but is it actually wrong?

I thought that rcu_read_lock/unlock is safe under spin_lock_irq...

> +	{
> +		guard(rcu)();
> +		scoped_seqlock_read (&sig->stats_lock, ss_lock_irqsave) {

how about

	scoped_guard(rcu)  {
		scoped_seqlock_read (&sig->stats_lock, ss_lock_irqsave) {
			...
		}
	}
		
?

Oleg.


  reply	other threads:[~2025-12-02  7:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  4:09 [PATCH] seqlock, procfs: Fix scoped_seqlock_read() critical section in do_task_stat() Ingo Molnar
2025-12-02  7:29 ` Oleg Nesterov [this message]
2025-12-02  9:05   ` [PATCH -v2] seqlock, procfs: Match scoped_seqlock_read() critical section vs. RCU ordering in do_task_stat() to do_io_accounting() Ingo Molnar
2025-12-02  9:21     ` Oleg Nesterov
2025-12-02 10:18       ` Ingo Molnar
2025-12-02 10:23     ` [tip: locking/urgent] " tip-bot2 for Ingo Molnar

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=aS6VX56DuPWY3bXk@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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 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.