syzbot


possible deadlock in evdev_pass_values (2)

Status: upstream: reported on 2023/04/21 09:42
Subsystems: input
[Documentation on labels]
Reported-by: syzbot+13d3cb2a3dc61e6092f5@syzkaller.appspotmail.com
First crash: 810d, last: 9h55m
Discussions (23)
Title Replies (including bot) Last reply
[syzbot] Monthly input report (Jun 2025) 0 (1) 2025/06/13 12:25
[syzbot] Monthly input report (May 2025) 0 (1) 2025/05/12 13:34
[syzbot] Monthly input report (Apr 2025) 0 (1) 2025/04/09 07:11
[syzbot] Monthly input report (Mar 2025) 0 (1) 2025/03/08 22:15
[syzbot] Monthly input report (Jan 2025) 0 (1) 2025/01/06 10:01
[syzbot] Monthly input report (Dec 2024) 0 (1) 2024/12/05 09:04
[syzbot] Monthly input report (Nov 2024) 0 (1) 2024/11/04 08:58
[syzbot] Monthly input report (Oct 2024) 0 (1) 2024/10/03 09:03
[syzbot] Monthly input report (Sep 2024) 0 (1) 2024/09/02 08:17
[syzbot] Monthly input report (Aug 2024) 0 (1) 2024/08/02 07:26
[syzbot] Monthly input report (Jul 2024) 0 (1) 2024/07/01 10:27
[syzbot] Monthly input report (May 2024) 0 (1) 2024/05/31 06:48
[syzbot] Monthly input report (Apr 2024) 0 (1) 2024/04/29 12:34
[syzbot] Monthly input report (Mar 2024) 0 (1) 2024/03/19 12:48
[syzbot] Monthly input report (Feb 2024) 0 (1) 2024/02/17 20:23
[syzbot] Monthly input report (Jan 2024) 0 (1) 2024/01/17 09:21
[syzbot] Monthly input report (Dec 2023) 0 (1) 2023/12/16 23:58
[syzbot] Monthly input report (Nov 2023) 0 (1) 2023/11/16 04:11
[syzbot] Monthly input report (Oct 2023) 0 (1) 2023/10/16 08:53
[syzbot] Monthly fs report (Aug 2023) 0 (1) 2023/08/08 12:55
[syzbot] Monthly fs report (Jul 2023) 0 (1) 2023/07/10 09:36
[syzbot] Monthly fs report (May 2023) 0 (1) 2023/05/06 14:02
[syzbot] [fs?] possible deadlock in evdev_pass_values (2) 0 (1) 2023/04/21 09:42
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in evdev_pass_values fuse kernfs 351 814d 1637d 0/29 closed as dup on 2021/07/02 09:55
linux-5.15 possible deadlock in evdev_pass_values (3) 11 311d 344d 0/3 auto-obsoleted due to no activity on 2024/11/05 23:17
linux-6.1 possible deadlock in evdev_pass_values (3) 17 396d 463d 0/3 auto-obsoleted due to no activity on 2024/08/12 15:10
linux-5.15 possible deadlock in evdev_pass_values (4) 2 151d 162d 0/3 auto-obsoleted due to no activity on 2025/05/14 14:17
linux-6.1 possible deadlock in evdev_pass_values 1 734d 734d 0/3 auto-obsoleted due to no activity on 2023/10/09 19:52
linux-5.15 possible deadlock in evdev_pass_values 6 611d 715d 0/3 auto-obsoleted due to no activity on 2024/02/09 07:09
linux-6.1 possible deadlock in evdev_pass_values (4) 4 80d 92d 0/3 upstream: reported on 2025/04/03 09:00
linux-5.15 possible deadlock in evdev_pass_values (2) 22 430d 507d 0/3 auto-obsoleted due to no activity on 2024/07/10 03:27
linux-6.1 possible deadlock in evdev_pass_values (2) 1 595d 595d 0/3 auto-obsoleted due to no activity on 2024/02/25 22:49

Sample crash report:
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 Not tainted
-----------------------------------------------------
syz.9.5554/22934 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff8880280bf750 (&new->fa_lock){....}-{3:3}, at: kill_fasync_rcu fs/fcntl.c:1124 [inline]
ffff8880280bf750 (&new->fa_lock){....}-{3:3}, at: kill_fasync+0x199/0x4d0 fs/fcntl.c:1148

and this task is already holding:
ffff88807ca50028 (&client->buffer_lock){..-.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff88807ca50028 (&client->buffer_lock){..-.}-{3:3}, at: evdev_pass_values+0xb9/0xbd0 drivers/input/evdev.c:261
which would create a new lock dependency:
 (&client->buffer_lock){..-.}-{3:3} -> (&new->fa_lock){....}-{3:3}

but this new dependency connects a SOFTIRQ-irq-safe lock:
 (&client->buffer_lock){..-.}-{3:3}

... which became SOFTIRQ-irq-safe at:
  lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
  __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
  _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
  spin_lock include/linux/spinlock.h:351 [inline]
  evdev_pass_values+0xb9/0xbd0 drivers/input/evdev.c:261
  evdev_events+0x1e6/0x340 drivers/input/evdev.c:306
  input_pass_values+0x285/0x890 drivers/input/input.c:127
  input_event_dispose+0x3e5/0x6b0 drivers/input/input.c:352
  input_event+0x8c/0xc0 drivers/input/input.c:395
  hidinput_hid_event+0x132c/0x1c90 drivers/hid/hid-input.c:1716
  hid_process_event+0x4be/0x620 drivers/hid/hid-core.c:1552
  hid_process_report drivers/hid/hid-core.c:1700 [inline]
  hid_report_raw_event+0xe91/0x16d0 drivers/hid/hid-core.c:2052
  __hid_input_report drivers/hid/hid-core.c:2122 [inline]
  hid_input_report+0x43e/0x520 drivers/hid/hid-core.c:2144
  hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
  __usb_hcd_giveback_urb+0x41a/0x690 drivers/usb/core/hcd.c:1650
  dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1995
  __run_hrtimer kernel/time/hrtimer.c:1761 [inline]
  __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1825
  hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842
  handle_softirqs+0x283/0x870 kernel/softirq.c:579
  __do_softirq kernel/softirq.c:613 [inline]
  invoke_softirq kernel/softirq.c:453 [inline]
  __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
  irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
  instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
  sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
  asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
  __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
  _raw_spin_unlock_irqrestore+0xa8/0x110 kernel/locking/spinlock.c:194
  sync_rcu_exp_done_unlocked+0xdb/0x150 kernel/rcu/tree_exp.h:172
  synchronize_rcu_expedited_wait_once kernel/rcu/tree_exp.h:545 [inline]
  synchronize_rcu_expedited_wait kernel/rcu/tree_exp.h:658 [inline]
  rcu_exp_wait_wake kernel/rcu/tree_exp.h:687 [inline]
  rcu_exp_sel_wait_wake+0x686/0xd40 kernel/rcu/tree_exp.h:721
  kthread_worker_fn+0x504/0xb60 kernel/kthread.c:1010
  kthread+0x711/0x8a0 kernel/kthread.c:464
  ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

to a SOFTIRQ-irq-unsafe lock:
 (tasklist_lock){.+.+}-{3:3}

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
  __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
  _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
  __do_wait+0xde/0x740 kernel/exit.c:1665
  do_wait+0x1f8/0x520 kernel/exit.c:1709
  kernel_wait+0xab/0x170 kernel/exit.c:1885
  call_usermodehelper_exec_sync kernel/umh.c:136 [inline]
  call_usermodehelper_exec_work+0xbe/0x230 kernel/umh.c:163
  process_one_work kernel/workqueue.c:3238 [inline]
  process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
  worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
  kthread+0x711/0x8a0 kernel/kthread.c:464
  ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  &client->buffer_lock --> &new->fa_lock --> tasklist_lock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(tasklist_lock);
                               local_irq_disable();
                               lock(&client->buffer_lock);
                               lock(&new->fa_lock);
  <Interrupt>
    lock(&client->buffer_lock);

 *** DEADLOCK ***

7 locks held by syz.9.5554/22934:
 #0: ffff88802a2f8118 (&evdev->mutex){+.+.}-{4:4}, at: evdev_write+0x1a1/0x480 drivers/input/evdev.c:511
 #1: ffff88802a0f7230 (&dev->event_lock#2){..-.}-{3:3}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:585 [inline]
 #1: ffff88802a0f7230 (&dev->event_lock#2){..-.}-{3:3}, at: input_inject_event+0xab/0x320 drivers/input/input.c:418
 #2: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #2: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #2: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: class_rcu_constructor include/linux/rcupdate.h:1155 [inline]
 #2: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: input_inject_event+0xbc/0x320 drivers/input/input.c:419
 #3: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #3: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #3: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: class_rcu_constructor include/linux/rcupdate.h:1155 [inline]
 #3: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: input_pass_values+0x8d/0x890 drivers/input/input.c:118
 #4: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #4: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #4: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: evdev_events+0x79/0x340 drivers/input/evdev.c:298
 #5: ffff88807ca50028 (&client->buffer_lock){..-.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #5: ffff88807ca50028 (&client->buffer_lock){..-.}-{3:3}, at: evdev_pass_values+0xb9/0xbd0 drivers/input/evdev.c:261
 #6: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #6: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #6: ffffffff8e13ee20 (rcu_read_lock){....}-{1:3}, at: kill_fasync+0x53/0x4d0 fs/fcntl.c:1147

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
-> (&client->buffer_lock){..-.}-{3:3} {
   IN-SOFTIRQ-W at:
                    lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                    __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
                    _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
                    spin_lock include/linux/spinlock.h:351 [inline]
                    evdev_pass_values+0xb9/0xbd0 drivers/input/evdev.c:261
                    evdev_events+0x1e6/0x340 drivers/input/evdev.c:306
                    input_pass_values+0x285/0x890 drivers/input/input.c:127
                    input_event_dispose+0x3e5/0x6b0 drivers/input/input.c:352
                    input_event+0x8c/0xc0 drivers/input/input.c:395
                    hidinput_hid_event+0x132c/0x1c90 drivers/hid/hid-input.c:1716
                    hid_process_event+0x4be/0x620 drivers/hid/hid-core.c:1552
                    hid_process_report drivers/hid/hid-core.c:1700 [inline]
                    hid_report_raw_event+0xe91/0x16d0 drivers/hid/hid-core.c:2052
                    __hid_input_report drivers/hid/hid-core.c:2122 [inline]
                    hid_input_report+0x43e/0x520 drivers/hid/hid-core.c:2144
                    hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
                    __usb_hcd_giveback_urb+0x41a/0x690 drivers/usb/core/hcd.c:1650
                    dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1995
                    __run_hrtimer kernel/time/hrtimer.c:1761 [inline]
                    __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1825
                    hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842
                    handle_softirqs+0x283/0x870 kernel/softirq.c:579
                    __do_softirq kernel/softirq.c:613 [inline]
                    invoke_softirq kernel/softirq.c:453 [inline]
                    __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
                    irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
                    instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
                    sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
                    asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
                    __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
                    _raw_spin_unlock_irqrestore+0xa8/0x110 kernel/locking/spinlock.c:194
                    sync_rcu_exp_done_unlocked+0xdb/0x150 kernel/rcu/tree_exp.h:172
                    synchronize_rcu_expedited_wait_once kernel/rcu/tree_exp.h:545 [inline]
                    synchronize_rcu_expedited_wait kernel/rcu/tree_exp.h:658 [inline]
                    rcu_exp_wait_wake kernel/rcu/tree_exp.h:687 [inline]
                    rcu_exp_sel_wait_wake+0x686/0xd40 kernel/rcu/tree_exp.h:721
                    kthread_worker_fn+0x504/0xb60 kernel/kthread.c:1010
                    kthread+0x711/0x8a0 kernel/kthread.c:464
                    ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
                    ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
   INITIAL USE at:
                   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                   __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
                   _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
                   spin_lock include/linux/spinlock.h:351 [inline]
                   evdev_pass_values+0xb9/0xbd0 drivers/input/evdev.c:261
                   evdev_events+0x1e6/0x340 drivers/input/evdev.c:306
                   input_pass_values+0x285/0x890 drivers/input/input.c:127
                   input_event_dispose+0x330/0x6b0 drivers/input/input.c:341
                   input_inject_event+0x1fe/0x320 drivers/input/input.c:423
                   evdev_write+0x2fc/0x480 drivers/input/evdev.c:528
                   vfs_write+0x27b/0xa90 fs/read_write.c:684
                   ksys_write+0x145/0x250 fs/read_write.c:738
                   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                   do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff99dd1220>] evdev_open.__key.25+0x0/0x20

the dependencies between the lock to be acquired
 and SOFTIRQ-irq-unsafe lock:
  -> (tasklist_lock){.+.+}-{3:3} {
     HARDIRQ-ON-R at:
                        lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                        __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                        _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
                        __do_wait+0xde/0x740 kernel/exit.c:1665
                        do_wait+0x1f8/0x520 kernel/exit.c:1709
                        kernel_wait+0xab/0x170 kernel/exit.c:1885
                        call_usermodehelper_exec_sync kernel/umh.c:136 [inline]
                        call_usermodehelper_exec_work+0xbe/0x230 kernel/umh.c:163
                        process_one_work kernel/workqueue.c:3238 [inline]
                        process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
                        worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
                        kthread+0x711/0x8a0 kernel/kthread.c:464
                        ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
                        ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     SOFTIRQ-ON-R at:
                        lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                        __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                        _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
                        __do_wait+0xde/0x740 kernel/exit.c:1665
                        do_wait+0x1f8/0x520 kernel/exit.c:1709
                        kernel_wait+0xab/0x170 kernel/exit.c:1885
                        call_usermodehelper_exec_sync kernel/umh.c:136 [inline]
                        call_usermodehelper_exec_work+0xbe/0x230 kernel/umh.c:163
                        process_one_work kernel/workqueue.c:3238 [inline]
                        process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
                        worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
                        kthread+0x711/0x8a0 kernel/kthread.c:464
                        ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
                        ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     INITIAL USE at:
                       lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                       __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                       _raw_write_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:326
                       copy_process+0x224f/0x3c00 kernel/fork.c:2315
                       kernel_clone+0x224/0x7f0 kernel/fork.c:2599
                       user_mode_thread+0xdd/0x140 kernel/fork.c:2677
                       rest_init+0x23/0x300 init/main.c:710
                       start_kernel+0x47d/0x500 init/main.c:1102
                       x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:307
                       x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:288
                       common_startup_64+0x13e/0x147
     INITIAL READ USE at:
                            lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                            __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                            _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
                            __do_wait+0xde/0x740 kernel/exit.c:1665
                            do_wait+0x1f8/0x520 kernel/exit.c:1709
                            kernel_wait+0xab/0x170 kernel/exit.c:1885
                            call_usermodehelper_exec_sync kernel/umh.c:136 [inline]
                            call_usermodehelper_exec_work+0xbe/0x230 kernel/umh.c:163
                            process_one_work kernel/workqueue.c:3238 [inline]
                            process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
                            worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
                            kthread+0x711/0x8a0 kernel/kthread.c:464
                            ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
                            ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
   }
   ... key      at: [<ffffffff8de0c058>] tasklist_lock+0x18/0x40
   ... acquired at:
   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
   __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
   _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
   send_sigurg+0x12b/0x420 fs/fcntl.c:967
   sk_send_sigurg+0x6c/0x2e0 net/core/sock.c:3641
   queue_oob+0x490/0x5a0 net/unix/af_unix.c:2303
   unix_stream_sendmsg+0xaf9/0xc90 net/unix/af_unix.c:2429
   sock_sendmsg_nosec net/socket.c:712 [inline]
   __sock_sendmsg+0x21c/0x270 net/socket.c:727
   ____sys_sendmsg+0x52d/0x830 net/socket.c:2566
   ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2620
   __sys_sendmmsg+0x227/0x430 net/socket.c:2709
   __do_sys_sendmmsg net/socket.c:2736 [inline]
   __se_sys_sendmmsg net/socket.c:2733 [inline]
   __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2733
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f

 -> (&f_owner->lock){....}-{3:3} {
    INITIAL USE at:
                     lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                     _raw_write_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:326
                     __f_setown+0x67/0x370 fs/fcntl.c:136
                     fcntl_dirnotify+0x3d6/0x690 fs/notify/dnotify/dnotify.c:369
                     do_fcntl+0x6d0/0x1910 fs/fcntl.c:539
                     __do_sys_fcntl fs/fcntl.c:591 [inline]
                     __se_sys_fcntl+0xc8/0x150 fs/fcntl.c:576
                     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                     do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
                     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    INITIAL READ USE at:
                          lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                          __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                          _raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236
                          send_sigio+0x38/0x370 fs/fcntl.c:907
                          dnotify_handle_event+0x169/0x440 fs/notify/dnotify/dnotify.c:113
                          fsnotify_handle_event fs/notify/fsnotify.c:376 [inline]
                          send_to_group fs/notify/fsnotify.c:424 [inline]
                          fsnotify+0x1814/0x1a80 fs/notify/fsnotify.c:641
                          fsnotify_name include/linux/fsnotify.h:55 [inline]
                          fsnotify_dirent include/linux/fsnotify.h:61 [inline]
                          fsnotify_create include/linux/fsnotify.h:348 [inline]
                          vfs_symlink+0x291/0x2f0 fs/namei.c:4741
                          do_symlinkat+0x1b1/0x3f0 fs/namei.c:4765
                          __do_sys_symlink fs/namei.c:4786 [inline]
                          __se_sys_symlink fs/namei.c:4784 [inline]
                          __x64_sys_symlink+0x7a/0x90 fs/namei.c:4784
                          do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                          do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
                          entry_SYSCALL_64_after_hwframe+0x77/0x7f
  }
  ... key      at: [<ffffffff99ac23a0>] file_f_owner_allocate.__key+0x0/0x20
  ... acquired at:
   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236
   send_sigio+0x38/0x370 fs/fcntl.c:907
   kill_fasync_rcu fs/fcntl.c:1133 [inline]
   kill_fasync+0x24d/0x4d0 fs/fcntl.c:1148
   lease_break_callback+0x26/0x30 fs/locks.c:558
   __break_lease+0x6a2/0x1620 fs/locks.c:1592
   break_lease include/linux/filelock.h:441 [inline]
   do_dentry_open+0xd62/0x1970 fs/open.c:955
   vfs_open+0x3b/0x340 fs/open.c:1094
   do_open fs/namei.c:3896 [inline]
   path_openat+0x2ee5/0x3830 fs/namei.c:4055
   do_filp_open+0x1fa/0x410 fs/namei.c:4082
   do_sys_openat2+0x121/0x1c0 fs/open.c:1437
   do_sys_open fs/open.c:1452 [inline]
   __do_sys_open fs/open.c:1460 [inline]
   __se_sys_open fs/open.c:1456 [inline]
   __x64_sys_open+0x11e/0x150 fs/open.c:1456
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> (&new->fa_lock){....}-{3:3} {
   INITIAL USE at:
                   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:326
                   fasync_remove_entry+0xf1/0x1c0 fs/fcntl.c:1001
                   sock_fasync+0x85/0xf0 net/socket.c:1416
                   __fput+0x89f/0xa70 fs/file_table.c:462
                   task_work_run+0x1d4/0x260 kernel/task_work.c:227
                   resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
                   exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114
                   exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
                   syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
                   syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
                   do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
   INITIAL READ USE at:
                        lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236
                        kill_fasync_rcu fs/fcntl.c:1124 [inline]
                        kill_fasync+0x199/0x4d0 fs/fcntl.c:1148
                        sock_wake_async+0x137/0x160 net/socket.c:-1
                        sk_wake_async_rcu include/net/sock.h:2521 [inline]
                        sock_def_error_report+0x332/0x390 net/core/sock.c:3570
                        sk_error_report+0x45/0x290 net/core/sock.c:348
                        unix_dgram_disconnected net/unix/af_unix.c:630 [inline]
                        unix_dgram_connect+0x997/0xce0 net/unix/af_unix.c:1558
                        __sys_connect_file net/socket.c:2038 [inline]
                        __sys_connect+0x316/0x440 net/socket.c:2057
                        __do_sys_connect net/socket.c:2063 [inline]
                        __se_sys_connect net/socket.c:2060 [inline]
                        __x64_sys_connect+0x7a/0x90 net/socket.c:2060
                        do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                        do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
                        entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff99ac23c0>] fasync_insert_entry.__key+0x0/0x20
 ... acquired at:
   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:1124 [inline]
   kill_fasync+0x199/0x4d0 fs/fcntl.c:1148
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values+0x627/0xbd0 drivers/input/evdev.c:278
   evdev_events+0x1e6/0x340 drivers/input/evdev.c:306
   input_pass_values+0x285/0x890 drivers/input/input.c:127
   input_event_dispose+0x330/0x6b0 drivers/input/input.c:341
   input_inject_event+0x1fe/0x320 drivers/input/input.c:423
   evdev_write+0x2fc/0x480 drivers/input/evdev.c:528
   vfs_write+0x27b/0xa90 fs/read_write.c:684
   ksys_write+0x145/0x250 fs/read_write.c:738
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f


stack backtrace:
CPU: 0 UID: 0 PID: 22934 Comm: syz.9.5554 Not tainted 6.16.0-rc4-syzkaller-00049-gb4911fb0b060 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_bad_irq_dependency kernel/locking/lockdep.c:2619 [inline]
 check_irq_usage kernel/locking/lockdep.c:2860 [inline]
 check_prev_add kernel/locking/lockdep.c:3172 [inline]
 check_prevs_add kernel/locking/lockdep.c:3287 [inline]
 validate_chain+0x1f05/0x2140 kernel/locking/lockdep.c:3911
 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240
 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
 _raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236
 kill_fasync_rcu fs/fcntl.c:1124 [inline]
 kill_fasync+0x199/0x4d0 fs/fcntl.c:1148
 __pass_event drivers/input/evdev.c:240 [inline]
 evdev_pass_values+0x627/0xbd0 drivers/input/evdev.c:278
 evdev_events+0x1e6/0x340 drivers/input/evdev.c:306
 input_pass_values+0x285/0x890 drivers/input/input.c:127
 input_event_dispose+0x330/0x6b0 drivers/input/input.c:341
 input_inject_event+0x1fe/0x320 drivers/input/input.c:423
 evdev_write+0x2fc/0x480 drivers/input/evdev.c:528
 vfs_write+0x27b/0xa90 fs/read_write.c:684
 ksys_write+0x145/0x250 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3f86d8e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3f87b41038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3f86fb5fa0 RCX: 00007f3f86d8e929
RDX: 0000000000002250 RSI: 0000200000000040 RDI: 0000000000000003
RBP: 00007f3f86e10b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f3f86fb5fa0 R15: 00007ffe91a4b3e8
 </TASK>

Crashes (1223):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/02 19:20 upstream b4911fb0b060 0cd59a8f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in evdev_pass_values
2025/07/02 12:56 upstream 66701750d556 0cd59a8f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/07/02 09:50 upstream 66701750d556 ffe4b334 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/06/30 21:03 upstream d0b3b7b22dfa 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in evdev_pass_values
2025/06/30 00:23 upstream d0b3b7b22dfa fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in evdev_pass_values
2025/06/28 01:09 upstream 35e261cd95dd 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/06/27 10:22 upstream 67a993863163 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/06/26 20:41 upstream e34a79b96ab9 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/06/26 12:32 upstream ee88bddf7f2f 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/06/26 11:26 upstream ee88bddf7f2f 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/06/25 21:48 upstream 92ca6c498a5e 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in evdev_pass_values
2025/06/14 18:05 upstream 4774cfe3543a 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/06/14 15:26 upstream 4774cfe3543a 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in evdev_pass_values
2025/06/14 15:18 upstream 4774cfe3543a 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/06/01 14:04 upstream 7d4e49a77d99 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/06/01 07:27 upstream 4cb6c8af8591 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/05/31 15:24 upstream 0f70f5b08a47 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in evdev_pass_values
2025/05/31 04:28 upstream 8477ab143069 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/05/28 00:24 upstream 015a99fa7665 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in evdev_pass_values
2025/05/23 17:33 upstream eccf6f2f6ab9 f8cc0c83 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/05/23 14:14 upstream 94305e83eccb f8cc0c83 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/05/22 14:40 upstream d608703fcdd9 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/05/22 00:05 upstream 4a95bc121ccd 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/05/21 23:37 upstream 4a95bc121ccd 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in evdev_pass_values
2025/05/21 22:26 upstream 4a95bc121ccd 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/05/21 16:45 upstream 4a95bc121ccd b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/05/21 10:13 upstream 4a95bc121ccd b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/05/21 06:49 upstream b36ddb9210e6 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/05/20 22:25 upstream b36ddb9210e6 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in evdev_pass_values
2025/05/20 21:11 upstream b36ddb9210e6 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/05/20 19:58 upstream b36ddb9210e6 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in evdev_pass_values
2025/05/20 12:33 upstream a5806cd506af 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/07/04 02:31 upstream 17bbde2e1716 76ad128c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/07/03 20:28 upstream 17bbde2e1716 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/07/03 09:01 upstream b4911fb0b060 115ceea7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/07/03 03:41 upstream b4911fb0b060 0cd59a8f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/07/02 22:01 upstream b4911fb0b060 0cd59a8f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/07/02 07:41 upstream 66701750d556 ffe4b334 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/07/02 04:33 upstream 66701750d556 ffe4b334 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/05/21 13:41 upstream 4a95bc121ccd b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/05/21 11:54 upstream 4a95bc121ccd b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/05/20 23:30 upstream b36ddb9210e6 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/05/20 21:10 upstream b36ddb9210e6 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2025/05/20 14:54 upstream a5806cd506af 8f9cf946 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in evdev_pass_values
2024/08/16 14:52 upstream d7a5aa4b3c00 e1c76ab2 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in evdev_pass_values
2025/06/25 10:00 upstream 7595b66ae9de 26d77996 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in evdev_pass_values
2023/04/19 19:50 upstream 789b4a41c247 a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2023/04/16 17:07 upstream 3e7bb4f24617 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in evdev_pass_values
2025/07/04 19:05 linux-next 26ffb3d6f02c d869b261 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in evdev_pass_values
2025/07/02 04:23 linux-next 1343433ed389 ffe4b334 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in evdev_pass_values
2025/06/13 07:49 linux-next bc6e0ba6c9ba 98683f8f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in evdev_pass_values
2025/06/05 08:19 linux-next 4f27f06ec121 6b6b5f21 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in evdev_pass_values
2025/06/03 09:42 linux-next a0bea9e39035 b396b4bf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in evdev_pass_values
2025/06/02 14:41 linux-next 3a83b350b5be b396b4bf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in evdev_pass_values
* Struck through repros no longer work on HEAD.