Re: [PATCH v2] fs/fcntl: fix SOFTIRQ-unsafe lock order in fasync signaling
From: Oleg Nesterov
Date: Mon Oct 12 2026 - 11:50:38 EST
Hi Mingyu,
On 10/12, Mingyu Wang wrote:
>
> In the original report, the task triggering the warning was in process
> context, through a TTY ioctl. Here are the relevant excerpts; omissions
> are marked with [...].
Thanks... so according to lockdep we have the
&dev->event_lock --> &f_owner->lock --> tasklist_lock
chain. At first glance this suggests that kill_fasync()->send_sigio() can
be called under input_dev->event_lock. But I know nothing about drivers/input,
so I can't find who does this...
And,
> input_inject_event+0xa4/0x3b0 drivers/input/input.c:419
...
> kbd_bh+0x23c/0x310 drivers/tty/vt/keyboard.c:1244
> tasklet_action_common+0x25c/0x3d0 kernel/softirq.c:925
means that ->event_lock can be acquired in softirq context.
That is all I can understand right now. Can you can send the full full
report without omissions? Not that I think this will help, at least to me ;)
Perhaps something like:
read_lock(tasklist) lock(event_lock)
write_lock(tasklist)
<Interrupt>
lock(event_lock) // send_sigio()
// ...
read_lock(tasklist)
Oleg.