Re: [PATCH] io_uring/napi: fix list use-after-free on PREEMPT_RT
From: Steven Rostedt
Date: Thu Oct 29 2026 - 10:02:45 EST
On Thu, 29 Oct 2026 07:42:09 -0600
Jens Axboe <axboe@xxxxxxxxx> wrote:
> I don't think your analysis is fully correct. On PREEMPT_RT, spin_lock()
> should still be an RCU read side critical section. __rt_spin_lock()
> calls rcu_read_lock() after taking the rtmutex, and then
> rt_spin_unlock() drops it at the end. There's even a comment on
> kfree_rcu() callbacks in there too, it should not be able to run until
> napi_lock is released, which is post the loop.
Good point.
>
> IOW, I think this patch is unnecessary - there's no bug there. The list
> safe change could be done as a cleanup, but it's not a fix.
I agree, it should still be applied, but as a clean up and not a fix.
-- Steve