Re: [PATCH] input/evdev: move kill_fasync() outside buffer_lock to fix SOFTIRQ deadlock

From: Dmitry Torokhov

Date: Wed May 13 2026 - 16:04:31 EST


Hi Rik,

On Wed, May 13, 2026 at 11:50:00AM -0400, Rik van Riel wrote:
> buffer_lock is a SOFTIRQ-safe spinlock. kill_fasync() acquires fa_lock
> (SOFTIRQ-unsafe), creating a potential SOFTIRQ-safe->SOFTIRQ-unsafe lock
> ordering violation that lockdep flags as a deadlock.
>
> Fix by moving the kill_fasync() call to evdev_pass_values() after
> buffer_lock is released, alongside the existing wake_up_interruptible_poll().
>
> The wakeup condition check is the same in __pass_event() and
> evdev_pass_values()

Does this really fix anything? This code is running holding
input->event_lock with IRQs off...

Thanks.

--
Dmitry