Re: [PATCH v5] serial: 8250: fix use-after-free in IRQ chain handling
From: Jing Wu
Date: Tue Jul 07 2026 - 10:00:01 EST
From: Qiliang Yuan <realwujing@xxxxxxxxx>
On Thu, Jun 25, 2026 at 06:38:35AM +0200, Jiri Slaby wrote:
> I don't follow, the function now looks like this:
> ...
> What am I missing?
You're right, nothing is missing. The function releases hash_mutex at
every return path, which is exactly what guard(mutex) provides. And
i->lock is only held across the list manipulation, before request_irq(),
so scoped_guard(spinlock_irq, &i->lock) also fits.
I'll send a v6 keeping the guard style.
Thanks,
Qiliang