Re: [PATCH] seqlock, procfs: Fix scoped_seqlock_read() critical section in do_task_stat()
From: Oleg Nesterov
Date: Tue Dec 02 2025 - 02:29:55 EST
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.