Re: [PATCH bpf-next 1/2] bpf: Account for preempt and IRQ state in RCU protection
Eduard Zingerman <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2026-08-05 at 16:39 -0700, Ning Ding wrote: > Disabling preemption or local IRQs keeps the current CPU in an RCU > read-side critical section, but in_rcu_cs() does not account for either > state. The verifier therefore rejects safe kptr accesses and invalidates > pointers when another RCU source ends. > > Include preemption-disabled and IRQ-disabled state in in_rcu_cs(). > Invalidate RCU-protected pointers on RCU unlock, preempt enable, or IRQ > restore only after the final protection ends. > > Signed-off-by: Ning Ding <[email protected]> > --- Hi Ning, Thank you for identifying and fixing this issue! Acked-by: Eduard Zingerman <[email protected]> ...