syzbot


possible deadlock in evdev_pass_values (5)

Status: upstream: reported on 2025/08/26 05:46
Reported-by: syzbot+27084c39cb0505ecb31e@syzkaller.appspotmail.com
First crash: 49d, last: 46d
Similar bugs (11)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in evdev_pass_values fuse kernfs 4 351 916d 1739d 0/29 closed as dup on 2021/07/02 09:55
linux-5.15 possible deadlock in evdev_pass_values (3) 4 11 413d 446d 0/3 auto-obsoleted due to no activity on 2024/11/05 23:17
linux-6.1 possible deadlock in evdev_pass_values (3) 4 17 498d 565d 0/3 auto-obsoleted due to no activity on 2024/08/12 15:10
linux-5.15 possible deadlock in evdev_pass_values (4) 4 2 253d 264d 0/3 auto-obsoleted due to no activity on 2025/05/14 14:17
linux-6.1 possible deadlock in evdev_pass_values 4 1 836d 836d 0/3 auto-obsoleted due to no activity on 2023/10/09 19:52
linux-6.6 possible deadlock in evdev_pass_values 4 2 68d 77d 0/2 upstream: reported on 2025/07/29 23:28
linux-5.15 possible deadlock in evdev_pass_values 4 6 713d 817d 0/3 auto-obsoleted due to no activity on 2024/02/09 07:09
upstream possible deadlock in evdev_pass_values (2) input 4 1424 10h52m 907d 0/29 upstream: reported on 2023/04/21 09:42
linux-6.1 possible deadlock in evdev_pass_values (4) 4 11 63d 194d 0/3 upstream: reported on 2025/04/03 09:00
linux-5.15 possible deadlock in evdev_pass_values (2) 4 22 532d 609d 0/3 auto-obsoleted due to no activity on 2024/07/10 03:27
linux-6.1 possible deadlock in evdev_pass_values (2) 4 1 697d 697d 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
syzkaller #0 Not tainted
-----------------------------------------------------
syz.5.657/7018 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff88807518e0c0 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1008 [inline]
ffff88807518e0c0 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x16d/0x490 fs/fcntl.c:1029

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

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

... which became SOFTIRQ-irq-safe at:
  lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
  __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
  _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
  spin_lock include/linux/spinlock.h:363 [inline]
  evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
  evdev_events+0x1c0/0x2f0 drivers/input/evdev.c:306
  input_to_handler drivers/input/input.c:126 [inline]
  input_pass_values+0x880/0x1220 drivers/input/input.c:156
  input_handle_event+0xbe0/0x1490 drivers/input/input.c:426
  input_event+0x88/0xb0 drivers/input/input.c:457
  hidinput_hid_event+0x118c/0x1900 drivers/hid/hid-input.c:1467
  hid_process_event+0x4b7/0x620 drivers/hid/hid-core.c:1540
  hid_input_field drivers/hid/hid-core.c:1584 [inline]
  hid_report_raw_event+0xdde/0x1640 drivers/hid/hid-core.c:1817
  hid_input_report+0x424/0x4e0 drivers/hid/hid-core.c:1884
  hid_irq_in+0x435/0x690 drivers/hid/usbhid/hid-core.c:284
  __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1674
  dummy_timer+0x827/0x2e10 drivers/usb/gadget/udc/dummy_hcd.c:1987
  call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
  expire_timers kernel/time/timer.c:1496 [inline]
  __run_timers+0x525/0x7c0 kernel/time/timer.c:1767
  run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
  handle_softirqs+0x328/0x820 kernel/softirq.c:576
  __do_softirq kernel/softirq.c:610 [inline]
  invoke_softirq kernel/softirq.c:450 [inline]
  __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
  irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
  instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
  sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
  asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
  preempt_count arch/x86/include/asm/preempt.h:27 [inline]
  check_kcov_mode kernel/kcov.c:172 [inline]
  __sanitizer_cov_trace_pc+0x13/0x60 kernel/kcov.c:206
  check_heap_object mm/usercopy.c:238 [inline]
  __check_object_size+0x236/0x410 mm/usercopy.c:286
  check_object_size include/linux/thread_info.h:199 [inline]
  check_copy_size include/linux/thread_info.h:232 [inline]
  copy_to_user include/linux/uaccess.h:199 [inline]
  xt_obj_to_user+0x9d/0x120 net/netfilter/x_tables.c:299
  xt_target_to_user+0x97/0x270 net/netfilter/x_tables.c:343
  copy_entries_to_user net/ipv4/netfilter/arp_tables.c:705 [inline]
  get_entries net/ipv4/netfilter/arp_tables.c:866 [inline]
  do_arpt_get_ctl+0xb9b/0xf40 net/ipv4/netfilter/arp_tables.c:1460
  nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
  ip_getsockopt+0x115a/0x1590 net/ipv4/ip_sockglue.c:1797
  tcp_getsockopt+0x1e3/0x2390 net/ipv4/tcp.c:4313
  __sys_getsockopt+0x1b0/0x230 net/socket.c:2247
  __do_sys_getsockopt net/socket.c:2262 [inline]
  __se_sys_getsockopt net/socket.c:2259 [inline]
  __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2259
  do_syscall_x64 arch/x86/entry/common.c:50 [inline]
  do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
  entry_SYSCALL_64_after_hwframe+0x66/0xd0

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

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
  __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
  _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
  do_wait+0x293/0xac0 kernel/exit.c:1579
  kernel_wait+0xa8/0x160 kernel/exit.c:1769
  call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
  call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
  process_one_work+0x863/0x1000 kernel/workqueue.c:2310
  worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
  kthread+0x436/0x520 kernel/kthread.c:334
  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

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.5.657/7018:
 #0: ffff88814853a110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_write+0x177/0x470 drivers/input/evdev.c:513
 #1: ffff888146e6a230 (&dev->event_lock#2){-.-.}-{2:2}, at: input_inject_event+0x9e/0x2c0 drivers/input/input.c:482
 #2: ffffffff8c11c460 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
 #3: ffffffff8c11c460 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
 #4: ffffffff8c11c460 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
 #5: ffff88805ea34028 (&client->buffer_lock){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
 #5: ffff88805ea34028 (&client->buffer_lock){..-.}-{2:2}, at: evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
 #6: ffffffff8c11c460 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
-> (&client->buffer_lock){..-.}-{2:2} {
   IN-SOFTIRQ-W at:
                    lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                    __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
                    _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                    spin_lock include/linux/spinlock.h:363 [inline]
                    evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
                    evdev_events+0x1c0/0x2f0 drivers/input/evdev.c:306
                    input_to_handler drivers/input/input.c:126 [inline]
                    input_pass_values+0x880/0x1220 drivers/input/input.c:156
                    input_handle_event+0xbe0/0x1490 drivers/input/input.c:426
                    input_event+0x88/0xb0 drivers/input/input.c:457
                    hidinput_hid_event+0x118c/0x1900 drivers/hid/hid-input.c:1467
                    hid_process_event+0x4b7/0x620 drivers/hid/hid-core.c:1540
                    hid_input_field drivers/hid/hid-core.c:1584 [inline]
                    hid_report_raw_event+0xdde/0x1640 drivers/hid/hid-core.c:1817
                    hid_input_report+0x424/0x4e0 drivers/hid/hid-core.c:1884
                    hid_irq_in+0x435/0x690 drivers/hid/usbhid/hid-core.c:284
                    __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1674
                    dummy_timer+0x827/0x2e10 drivers/usb/gadget/udc/dummy_hcd.c:1987
                    call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
                    expire_timers kernel/time/timer.c:1496 [inline]
                    __run_timers+0x525/0x7c0 kernel/time/timer.c:1767
                    run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
                    handle_softirqs+0x328/0x820 kernel/softirq.c:576
                    __do_softirq kernel/softirq.c:610 [inline]
                    invoke_softirq kernel/softirq.c:450 [inline]
                    __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
                    irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
                    instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
                    sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
                    asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
                    preempt_count arch/x86/include/asm/preempt.h:27 [inline]
                    check_kcov_mode kernel/kcov.c:172 [inline]
                    __sanitizer_cov_trace_pc+0x13/0x60 kernel/kcov.c:206
                    check_heap_object mm/usercopy.c:238 [inline]
                    __check_object_size+0x236/0x410 mm/usercopy.c:286
                    check_object_size include/linux/thread_info.h:199 [inline]
                    check_copy_size include/linux/thread_info.h:232 [inline]
                    copy_to_user include/linux/uaccess.h:199 [inline]
                    xt_obj_to_user+0x9d/0x120 net/netfilter/x_tables.c:299
                    xt_target_to_user+0x97/0x270 net/netfilter/x_tables.c:343
                    copy_entries_to_user net/ipv4/netfilter/arp_tables.c:705 [inline]
                    get_entries net/ipv4/netfilter/arp_tables.c:866 [inline]
                    do_arpt_get_ctl+0xb9b/0xf40 net/ipv4/netfilter/arp_tables.c:1460
                    nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116
                    ip_getsockopt+0x115a/0x1590 net/ipv4/ip_sockglue.c:1797
                    tcp_getsockopt+0x1e3/0x2390 net/ipv4/tcp.c:4313
                    __sys_getsockopt+0x1b0/0x230 net/socket.c:2247
                    __do_sys_getsockopt net/socket.c:2262 [inline]
                    __se_sys_getsockopt net/socket.c:2259 [inline]
                    __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2259
                    do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                    do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
                    entry_SYSCALL_64_after_hwframe+0x66/0xd0
   INITIAL USE at:
                   lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                   __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
                   _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                   spin_lock include/linux/spinlock.h:363 [inline]
                   evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
                   evdev_events+0x1c0/0x2f0 drivers/input/evdev.c:306
                   input_to_handler drivers/input/input.c:126 [inline]
                   input_pass_values+0x880/0x1220 drivers/input/input.c:156
                   input_handle_event+0xb3f/0x1490 drivers/input/input.c:415
                   input_inject_event+0x1b9/0x2c0 drivers/input/input.c:487
                   evdev_write+0x326/0x470 drivers/input/evdev.c:530
                   vfs_write+0x300/0xd00 fs/read_write.c:592
                   ksys_write+0x14d/0x250 fs/read_write.c:647
                   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
                   entry_SYSCALL_64_after_hwframe+0x66/0xd0
 }
 ... key      at: [<ffffffff96424d60>] evdev_open.__key.22+0x0/0x20

the dependencies between the lock to be acquired
 and SOFTIRQ-irq-unsafe lock:
  -> (tasklist_lock){.+.+}-{2:2} {
     HARDIRQ-ON-R at:
                        lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                        __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
                        _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                        do_wait+0x293/0xac0 kernel/exit.c:1579
                        kernel_wait+0xa8/0x160 kernel/exit.c:1769
                        call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                        call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
                        process_one_work+0x863/0x1000 kernel/workqueue.c:2310
                        worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
                        kthread+0x436/0x520 kernel/kthread.c:334
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
     SOFTIRQ-ON-R at:
                        lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                        __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
                        _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                        do_wait+0x293/0xac0 kernel/exit.c:1579
                        kernel_wait+0xa8/0x160 kernel/exit.c:1769
                        call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                        call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
                        process_one_work+0x863/0x1000 kernel/workqueue.c:2310
                        worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
                        kthread+0x436/0x520 kernel/kthread.c:334
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
     INITIAL USE at:
                       lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                       __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline]
                       _raw_write_lock_irq+0x9f/0xe0 kernel/locking/spinlock.c:316
                       copy_process+0x234a/0x3e00 kernel/fork.c:2412
                       kernel_clone+0x219/0x930 kernel/fork.c:2679
                       kernel_thread+0xc8/0x120 kernel/fork.c:2731
                       rest_init+0x21/0x330 init/main.c:706
                       start_kernel+0x486/0x530 init/main.c:1140
                       secondary_startup_64_no_verify+0xb1/0xbb
     INITIAL READ USE at:
                            lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                            __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
                            _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                            do_wait+0x293/0xac0 kernel/exit.c:1579
                            kernel_wait+0xa8/0x160 kernel/exit.c:1769
                            call_usermodehelper_exec_sync kernel/umh.c:139 [inline]
                            call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:166
                            process_one_work+0x863/0x1000 kernel/workqueue.c:2310
                            worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
                            kthread+0x436/0x520 kernel/kthread.c:334
                            ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
   }
   ... key      at: [<ffffffff8be0a058>] tasklist_lock+0x18/0x40
   ... acquired at:
   __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
   _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
   send_sigurg+0xcb/0x390 fs/fcntl.c:845
   sk_send_sigurg+0x6b/0xc0 net/core/sock.c:3129
   queue_oob+0x620/0x800 net/unix/af_unix.c:2016
   unix_stream_sendmsg+0xb5d/0xc80 net/unix/af_unix.c:2116
   sock_sendmsg_nosec net/socket.c:704 [inline]
   __sock_sendmsg net/socket.c:716 [inline]
   ____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436
   ___sys_sendmsg+0x1f0/0x260 net/socket.c:2490
   __sys_sendmmsg+0x27c/0x4a0 net/socket.c:2576
   __do_sys_sendmmsg net/socket.c:2605 [inline]
   __se_sys_sendmmsg net/socket.c:2602 [inline]
   __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2602
   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
   entry_SYSCALL_64_after_hwframe+0x66/0xd0

 -> (&f->f_owner.lock){...-}-{2:2} {
    IN-SOFTIRQ-R at:
                      lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                      __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
                      _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
                      send_sigurg+0x25/0x390 fs/fcntl.c:829
                      sk_send_sigurg+0x6b/0xc0 net/core/sock.c:3129
                      tcp_check_urg net/ipv4/tcp_input.c:5688 [inline]
                      tcp_urg+0x2bc/0xb10 net/ipv4/tcp_input.c:5729
                      tcp_rcv_established+0xac5/0x1cb0 net/ipv4/tcp_input.c:6063
                      tcp_v4_do_rcv+0x44b/0x9b0 net/ipv4/tcp_ipv4.c:1731
                      tcp_v4_rcv+0x268f/0x2cb0 net/ipv4/tcp_ipv4.c:2143
                      ip_protocol_deliver_rcu+0x3ad/0x770 net/ipv4/ip_input.c:204
                      ip_local_deliver_finish+0x1d5/0x320 net/ipv4/ip_input.c:231
                      NF_HOOK+0x2d6/0x360 include/linux/netfilter.h:302
                      NF_HOOK+0x2d6/0x360 include/linux/netfilter.h:302
                      __netif_receive_skb_one_core net/core/dev.c:5525 [inline]
                      __netif_receive_skb+0xcc/0x290 net/core/dev.c:5639
                      process_backlog+0x364/0x780 net/core/dev.c:6516
                      __napi_poll+0xc0/0x430 net/core/dev.c:7075
                      napi_poll net/core/dev.c:7142 [inline]
                      net_rx_action+0x4a8/0x9c0 net/core/dev.c:7232
                      handle_softirqs+0x328/0x820 kernel/softirq.c:576
                      __do_softirq kernel/softirq.c:610 [inline]
                      invoke_softirq kernel/softirq.c:450 [inline]
                      __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
                      irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
                      instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
                      sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
                      asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
                      stack_depot_save+0x153/0x440 lib/stackdepot.c:280
                      kasan_save_stack mm/kasan/common.c:40 [inline]
                      kasan_set_track mm/kasan/common.c:46 [inline]
                      set_alloc_info mm/kasan/common.c:434 [inline]
                      __kasan_slab_alloc+0xb3/0xd0 mm/kasan/common.c:467
                      kasan_slab_alloc include/linux/kasan.h:254 [inline]
                      slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
                      slab_alloc_node mm/slub.c:3220 [inline]
                      slab_alloc mm/slub.c:3228 [inline]
                      kmem_cache_alloc+0x100/0x290 mm/slub.c:3233
                      getname_flags+0xb5/0x500 fs/namei.c:138
                      do_sys_openat2+0xcf/0x4a0 fs/open.c:1247
                      do_sys_open fs/open.c:1269 [inline]
                      __do_sys_openat fs/open.c:1285 [inline]
                      __se_sys_openat fs/open.c:1280 [inline]
                      __x64_sys_openat+0x135/0x160 fs/open.c:1280
                      do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                      do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
                      entry_SYSCALL_64_after_hwframe+0x66/0xd0
    INITIAL USE at:
                     lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline]
                     _raw_write_lock_irq+0x9f/0xe0 kernel/locking/spinlock.c:316
                     __f_setown+0x37/0x330 fs/fcntl.c:91
                     __tty_fasync drivers/tty/tty_io.c:2261 [inline]
                     tty_fasync+0x2a6/0x3b0 drivers/tty/tty_io.c:2276
                     setfl fs/fcntl.c:74 [inline]
                     do_fcntl+0xee4/0x12d0 fs/fcntl.c:350
                     __do_sys_fcntl fs/fcntl.c:466 [inline]
                     __se_sys_fcntl+0xcc/0x190 fs/fcntl.c:451
                     do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                     do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
                     entry_SYSCALL_64_after_hwframe+0x66/0xd0
    INITIAL READ USE at:
                          lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                          __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
                          _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
                          send_sigurg+0x25/0x390 fs/fcntl.c:829
                          sk_send_sigurg+0x6b/0xc0 net/core/sock.c:3129
                          tcp_check_urg net/ipv4/tcp_input.c:5688 [inline]
                          tcp_urg+0x2bc/0xb10 net/ipv4/tcp_input.c:5729
                          tcp_rcv_established+0xac5/0x1cb0 net/ipv4/tcp_input.c:6063
                          tcp_v4_do_rcv+0x44b/0x9b0 net/ipv4/tcp_ipv4.c:1731
                          sk_backlog_rcv include/net/sock.h:1061 [inline]
                          __release_sock+0x1b9/0x420 net/core/sock.c:2725
                          release_sock+0x5b/0x1b0 net/core/sock.c:3266
                          sk_stream_wait_memory+0x6d8/0xe50 net/core/stream.c:145
                          tcp_sendmsg_locked+0x1c9f/0x3590 net/ipv4/tcp.c:1419
                          tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457
                          sock_sendmsg_nosec net/socket.c:704 [inline]
                          __sock_sendmsg net/socket.c:716 [inline]
                          __sys_sendto+0x423/0x580 net/socket.c:2063
                          __do_sys_sendto net/socket.c:2075 [inline]
                          __se_sys_sendto net/socket.c:2071 [inline]
                          __x64_sys_sendto+0xda/0xf0 net/socket.c:2071
                          do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                          do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
                          entry_SYSCALL_64_after_hwframe+0x66/0xd0
  }
  ... key      at: [<ffffffff96128ac0>] __alloc_file.__key+0x0/0x10
  ... acquired at:
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
   _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
   send_sigio+0x2f/0x330 fs/fcntl.c:790
   kill_fasync_rcu fs/fcntl.c:1015 [inline]
   kill_fasync+0x20a/0x490 fs/fcntl.c:1029
   lease_break_callback+0x22/0x30 fs/locks.c:613
   __break_lease+0x4a3/0x12b0 fs/locks.c:1615
   break_lease include/linux/fs.h:2650 [inline]
   do_dentry_open+0x771/0xf80 fs/open.c:817
   do_open fs/namei.c:3608 [inline]
   path_openat+0x2682/0x2f30 fs/namei.c:3742
   do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
   do_sys_openat2+0x142/0x4a0 fs/open.c:1253
   do_sys_open fs/open.c:1269 [inline]
   __do_sys_openat fs/open.c:1285 [inline]
   __se_sys_openat fs/open.c:1280 [inline]
   __x64_sys_openat+0x135/0x160 fs/open.c:1280
   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
   entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> (&new->fa_lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:196 [inline]
                   _raw_write_lock_irq+0x9f/0xe0 kernel/locking/spinlock.c:316
                   fasync_remove_entry+0xf0/0x1c0 fs/fcntl.c:885
                   __tty_fasync drivers/tty/tty_io.c:2243 [inline]
                   __tty_hangup+0x2d1/0x680 drivers/tty/tty_io.c:629
                   tty_release+0x400/0x16c0 drivers/tty/tty_io.c:1773
                   __fput+0x234/0x930 fs/file_table.c:311
                   task_work_run+0x125/0x1a0 kernel/task_work.c:188
                   tracehook_notify_resume include/linux/tracehook.h:189 [inline]
                   exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
                   exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
                   __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
                   syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
                   do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
                   entry_SYSCALL_64_after_hwframe+0x66/0xd0
   INITIAL READ USE at:
                        lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
                        _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
                        kill_fasync_rcu fs/fcntl.c:1008 [inline]
                        kill_fasync+0x16d/0x490 fs/fcntl.c:1029
                        lease_break_callback+0x22/0x30 fs/locks.c:613
                        __break_lease+0x4a3/0x12b0 fs/locks.c:1615
                        break_lease include/linux/fs.h:2650 [inline]
                        do_dentry_open+0x771/0xf80 fs/open.c:817
                        do_open fs/namei.c:3608 [inline]
                        path_openat+0x2682/0x2f30 fs/namei.c:3742
                        do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
                        do_sys_openat2+0x142/0x4a0 fs/open.c:1253
                        do_sys_open fs/open.c:1269 [inline]
                        __do_sys_openat fs/open.c:1285 [inline]
                        __se_sys_openat fs/open.c:1280 [inline]
                        __x64_sys_openat+0x135/0x160 fs/open.c:1280
                        do_syscall_x64 arch/x86/entry/common.c:50 [inline]
                        do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
                        entry_SYSCALL_64_after_hwframe+0x66/0xd0
 }
 ... key      at: [<ffffffff96129740>] fasync_insert_entry.__key+0x0/0x20
 ... acquired at:
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
   _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:1008 [inline]
   kill_fasync+0x16d/0x490 fs/fcntl.c:1029
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values+0x54b/0xab0 drivers/input/evdev.c:278
   evdev_events+0x1c0/0x2f0 drivers/input/evdev.c:306
   input_to_handler drivers/input/input.c:126 [inline]
   input_pass_values+0x880/0x1220 drivers/input/input.c:156
   input_handle_event+0xb3f/0x1490 drivers/input/input.c:415
   input_inject_event+0x1b9/0x2c0 drivers/input/input.c:487
   evdev_write+0x326/0x470 drivers/input/evdev.c:530
   vfs_write+0x300/0xd00 fs/read_write.c:592
   ksys_write+0x14d/0x250 fs/read_write.c:647
   do_syscall_x64 arch/x86/entry/common.c:50 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
   entry_SYSCALL_64_after_hwframe+0x66/0xd0


stack backtrace:
CPU: 1 PID: 7018 Comm: syz.5.657 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 print_bad_irq_dependency kernel/locking/lockdep.c:2567 [inline]
 check_irq_usage kernel/locking/lockdep.c:2806 [inline]
 check_prev_add kernel/locking/lockdep.c:3057 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x65dd/0x7c60 kernel/locking/lockdep.c:5012
 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:159 [inline]
 _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
 kill_fasync_rcu fs/fcntl.c:1008 [inline]
 kill_fasync+0x16d/0x490 fs/fcntl.c:1029
 __pass_event drivers/input/evdev.c:240 [inline]
 evdev_pass_values+0x54b/0xab0 drivers/input/evdev.c:278
 evdev_events+0x1c0/0x2f0 drivers/input/evdev.c:306
 input_to_handler drivers/input/input.c:126 [inline]
 input_pass_values+0x880/0x1220 drivers/input/input.c:156
 input_handle_event+0xb3f/0x1490 drivers/input/input.c:415
 input_inject_event+0x1b9/0x2c0 drivers/input/input.c:487
 evdev_write+0x326/0x470 drivers/input/evdev.c:530
 vfs_write+0x300/0xd00 fs/read_write.c:592
 ksys_write+0x14d/0x250 fs/read_write.c:647
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f8157da2be9
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:00007f815600a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f8157fd9fa0 RCX: 00007f8157da2be9
RDX: 0000000000001068 RSI: 0000200000000040 RDI: 0000000000000006
RBP: 00007f8157e25e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8157fda038 R14: 00007f8157fd9fa0 R15: 00007ffd62e04058
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/30 02:16 linux-5.15.y 01879f56bdde 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
2025/08/26 05:45 linux-5.15.y c79648372d02 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in evdev_pass_values
* Struck through repros no longer work on HEAD.