Re: [PATCH v1] irq_work: Fix use-after-free in irq_work_single on PREEMPT_RT

From: Steven Rostedt

Date: Wed Mar 25 2026 - 13:56:22 EST


On Wed, 25 Mar 2026 18:51:50 +0100
Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:

> > Perhaps Jiayuan's idea is better as it will not require modifying current
> > callers and does fix the issue.
>
> Don't you need to replace irq_work_sync() with this new one?
>
> > But it would still need helper functions from RCU as I really do not think
> > it's a good idea to open code the rcuwait logic.
>
> Why is rcuwait a concern?

Oh, I was talking about how the patch open coded rcuwait (which we shouldn't do).

Are you saying that if we stick a synchronize_rcu() in irq_work_sync() that
could work too?

-- Steve