Re: [PATCH -v2] seqlock, procfs: Match scoped_seqlock_read() critical section vs. RCU ordering in do_task_stat() to do_io_accounting()
From: Ingo Molnar
Date: Tue Dec 02 2025 - 05:20:08 EST
* Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> On 12/02, Ingo Molnar wrote:
> >
> > * Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> >
> > > 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...
> >
> > Yeah, true - it's allowed and not a bug,
>
> OK, thanks ;)
>
> > merely
> > discouraged inside irqs-off sections if it can be
> > avoided, and it's an inconsistency versus
> > do_io_accounting().
>
> Yes, yes, agreed
>
> > How about the -v2 phrasing below? I also removed the
> > Fixes tags.
>
> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Thanks Oleg!
Ingo