syzbot


possible deadlock in kbd_event

Status: upstream: reported on 2025/10/14 00:10
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+781c8bb5e4d62cc883d3@syzkaller.appspotmail.com
First crash: 5d00h, last: 7h03m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [serial?] possible deadlock in kbd_event 0 (1) 2025/10/14 00:10

Sample crash report:
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
syzkaller #0 Not tainted
-----------------------------------------------------
syz.5.4084/20345 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff88805327b6a8 (&new->fa_lock){....}-{3:3}, at: kill_fasync_rcu fs/fcntl.c:1122 [inline]
ffff88805327b6a8 (&new->fa_lock){....}-{3:3}, at: kill_fasync+0x199/0x4d0 fs/fcntl.c:1146

and this task is already holding:
ffff888056c30468 (&tty->flow.lock){....}-{3:3}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:585 [inline]
ffff888056c30468 (&tty->flow.lock){....}-{3:3}, at: start_tty+0x20/0x70 drivers/tty/tty_io.c:793
which would create a new lock dependency:
 (&tty->flow.lock){....}-{3:3} -> (&new->fa_lock){....}-{3:3}

but this new dependency connects a SOFTIRQ-irq-safe lock:
 (kbd_event_lock){..-.}-{3:3}

... which became SOFTIRQ-irq-safe at:
  lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
  __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]
  kbd_event+0xd2/0x3f70 drivers/tty/vt/keyboard.c:1528
  input_handle_events_default+0xd4/0x1a0 drivers/input/input.c:2541
  input_pass_values+0x288/0x890 drivers/input/input.c:128
  input_event_dispose+0x3e5/0x6b0 drivers/input/input.c:353
  input_event+0x89/0xe0 drivers/input/input.c:396
  hidinput_hid_event+0x1362/0x1ca0 drivers/hid/hid-input.c:1727
  hid_process_event+0x4be/0x620 drivers/hid/hid-core.c:1565
  hid_process_report drivers/hid/hid-core.c:1713 [inline]
  hid_report_raw_event+0xe91/0x16d0 drivers/hid/hid-core.c:2074
  __hid_input_report drivers/hid/hid-core.c:2144 [inline]
  hid_input_report+0x43e/0x520 drivers/hid/hid-core.c:2166
  hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
  __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661
  dummy_timer+0x85f/0x44c0 drivers/usb/gadget/udc/dummy_hcd.c:1995
  __run_hrtimer kernel/time/hrtimer.c:1777 [inline]
  __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841
  hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
  handle_softirqs+0x286/0x870 kernel/softirq.c:622
  __do_softirq kernel/softirq.c:656 [inline]
  invoke_softirq kernel/softirq.c:496 [inline]
  __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723
  irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
  instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
  sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
  asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
  call_rcu+0x73e/0x9c0 kernel/rcu/tree.c:3244
  slab_free_hook mm/slub.c:2487 [inline]
  slab_free mm/slub.c:6611 [inline]
  kmem_cache_free+0x4b5/0x690 mm/slub.c:6721
  __io_req_caches_free+0x1c1/0x270 io_uring/io_uring.c:2824
  io_req_caches_free+0x21/0x60 io_uring/io_uring.c:2836
  io_ring_exit_work+0x415/0x930 io_uring/io_uring.c:3034
  process_one_work kernel/workqueue.c:3263 [inline]
  process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
  worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
  kthread+0x711/0x8a0 kernel/kthread.c:463
  ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
  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:5868
  __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:1667
  do_wait+0x1f8/0x510 kernel/exit.c:1711
  kernel_wait+0xab/0x170 kernel/exit.c:1887
  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:3263 [inline]
  process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
  worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
  kthread+0x711/0x8a0 kernel/kthread.c:463
  ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

other info that might help us debug this:

Chain exists of:
  kbd_event_lock --> &tty->flow.lock --> tasklist_lock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(tasklist_lock);
                               local_irq_disable();
                               lock(kbd_event_lock);
                               lock(&tty->flow.lock);
  <Interrupt>
    lock(kbd_event_lock);

 *** DEADLOCK ***

6 locks held by syz.5.4084/20345:
 #0: ffff888056c300a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffff888056c302e8 (&tty->termios_rwsem/1){++++}-{4:4}, at: tty_set_termios+0x138/0x17e0 drivers/tty/tty_ioctl.c:333
 #2: ffff888056c300a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1c/0x90 drivers/tty/tty_ldisc.c:263
 #3: ffff888056c30468 (&tty->flow.lock){....}-{3:3}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:585 [inline]
 #3: ffff888056c30468 (&tty->flow.lock){....}-{3:3}, at: start_tty+0x20/0x70 drivers/tty/tty_io.c:793
 #4: ffff888056c300a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1c/0x90 drivers/tty/tty_ldisc.c:263
 #5: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #5: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:867 [inline]
 #5: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: kill_fasync+0x53/0x4d0 fs/fcntl.c:1145

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
 -> (kbd_event_lock){..-.}-{3:3} {
    IN-SOFTIRQ-W at:
                      lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
                      __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]
                      kbd_event+0xd2/0x3f70 drivers/tty/vt/keyboard.c:1528
                      input_handle_events_default+0xd4/0x1a0 drivers/input/input.c:2541
                      input_pass_values+0x288/0x890 drivers/input/input.c:128
                      input_event_dispose+0x3e5/0x6b0 drivers/input/input.c:353
                      input_event+0x89/0xe0 drivers/input/input.c:396
                      hidinput_hid_event+0x1362/0x1ca0 drivers/hid/hid-input.c:1727
                      hid_process_event+0x4be/0x620 drivers/hid/hid-core.c:1565
                      hid_process_report drivers/hid/hid-core.c:1713 [inline]
                      hid_report_raw_event+0xe91/0x16d0 drivers/hid/hid-core.c:2074
                      __hid_input_report drivers/hid/hid-core.c:2144 [inline]
                      hid_input_report+0x43e/0x520 drivers/hid/hid-core.c:2166
                      hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
                      __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661
                      dummy_timer+0x85f/0x44c0 drivers/usb/gadget/udc/dummy_hcd.c:1995
                      __run_hrtimer kernel/time/hrtimer.c:1777 [inline]
                      __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841
                      hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
                      handle_softirqs+0x286/0x870 kernel/softirq.c:622
                      __do_softirq kernel/softirq.c:656 [inline]
                      invoke_softirq kernel/softirq.c:496 [inline]
                      __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723
                      irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
                      instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
                      sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
                      asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
                      call_rcu+0x73e/0x9c0 kernel/rcu/tree.c:3244
                      slab_free_hook mm/slub.c:2487 [inline]
                      slab_free mm/slub.c:6611 [inline]
                      kmem_cache_free+0x4b5/0x690 mm/slub.c:6721
                      __io_req_caches_free+0x1c1/0x270 io_uring/io_uring.c:2824
                      io_req_caches_free+0x21/0x60 io_uring/io_uring.c:2836
                      io_ring_exit_work+0x415/0x930 io_uring/io_uring.c:3034
                      process_one_work kernel/workqueue.c:3263 [inline]
                      process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
                      worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
                      kthread+0x711/0x8a0 kernel/kthread.c:463
                      ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
                      ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
    INITIAL USE at:
                     lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
                     __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                     _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162
                     vt_reset_unicode+0x2b/0x160 drivers/tty/vt/keyboard.c:2187
                     reset_vc+0x68/0x1b0 drivers/tty/vt/vt_ioctl.c:966
                     vc_init+0x70/0x4a0 drivers/tty/vt/vt.c:3728
                     con_init+0x385/0x9c0 drivers/tty/vt/vt.c:3793
                     console_init+0x10e/0x430 kernel/printk/printk.c:4298
                     start_kernel+0x254/0x410 init/main.c:1048
                     x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
                     x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
                     common_startup_64+0x13e/0x147
  }
  ... key      at: [<ffffffff8e96ee78>] kbd_event_lock+0x18/0xa0 keyboard.c:-1
-> (&tty->flow.lock){....}-{3:3} {
   INITIAL USE at:
                   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
                   __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                   _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162
                   class_spinlock_irqsave_constructor include/linux/spinlock.h:585 [inline]
                   start_tty+0x20/0x70 drivers/tty/tty_io.c:793
                   n_tty_set_termios+0xa7c/0x1090 drivers/tty/n_tty.c:1858
                   tty_set_termios+0xda4/0x17e0 drivers/tty/tty_ioctl.c:348
                   set_termios+0x516/0x6c0 drivers/tty/tty_ioctl.c:516
                   tty_mode_ioctl+0x47e/0x740 drivers/tty/tty_ioctl.c:-1
                   tty_ioctl+0x9c6/0xde0 drivers/tty/tty_io.c:2801
                   vfs_ioctl fs/ioctl.c:51 [inline]
                   __do_sys_ioctl fs/ioctl.c:597 [inline]
                   __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
                   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                   do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff99d18ce0>] alloc_tty_struct.__key.35+0x0/0x20
 ... acquired at:
   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
   __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
   _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162
   class_spinlock_irqsave_constructor include/linux/spinlock.h:585 [inline]
   stop_tty+0x2f/0x150 drivers/tty/tty_io.c:765
   kbd_keycode drivers/tty/vt/keyboard.c:1515 [inline]
   kbd_event+0x2b72/0x3f70 drivers/tty/vt/keyboard.c:1534
   input_handle_events_default+0xd4/0x1a0 drivers/input/input.c:2541
   input_pass_values+0x288/0x890 drivers/input/input.c:128
   input_event_dispose+0x330/0x6b0 drivers/input/input.c:342
   input_inject_event+0x1dd/0x340 drivers/input/input.c:424
   evdev_write+0x2fc/0x480 drivers/input/evdev.c:528
   vfs_write+0x27e/0xb30 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/0xfa0 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f


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:5868
                        __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:1667
                        do_wait+0x1f8/0x510 kernel/exit.c:1711
                        kernel_wait+0xab/0x170 kernel/exit.c:1887
                        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:3263 [inline]
                        process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
                        worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
                        kthread+0x711/0x8a0 kernel/kthread.c:463
                        ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
                        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:5868
                        __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:1667
                        do_wait+0x1f8/0x510 kernel/exit.c:1711
                        kernel_wait+0xab/0x170 kernel/exit.c:1887
                        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:3263 [inline]
                        process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
                        worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
                        kthread+0x711/0x8a0 kernel/kthread.c:463
                        ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
                        ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     INITIAL USE at:
                       lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
                       __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:2327
                       kernel_clone+0x21e/0x840 kernel/fork.c:2609
                       user_mode_thread+0xdd/0x140 kernel/fork.c:2685
                       rest_init+0x23/0x300 init/main.c:722
                       start_kernel+0x3ae/0x410 init/main.c:1111
                       x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
                       x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
                       common_startup_64+0x13e/0x147
     INITIAL READ USE at:
                            lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
                            __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:1667
                            do_wait+0x1f8/0x510 kernel/exit.c:1711
                            kernel_wait+0xab/0x170 kernel/exit.c:1887
                            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:3263 [inline]
                            process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
                            worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
                            kthread+0x711/0x8a0 kernel/kthread.c:463
                            ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
                            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:5868
   __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:965
   sk_send_sigurg+0x6c/0x2e0 net/core/sock.c:3609
   queue_oob+0x420/0x4f0 net/unix/af_unix.c:2380
   unix_stream_sendmsg+0xc3f/0xdf0 net/unix/af_unix.c:2516
   sock_sendmsg_nosec net/socket.c:727 [inline]
   __sock_sendmsg+0x21c/0x270 net/socket.c:742
   ____sys_sendmsg+0x505/0x830 net/socket.c:2630
   ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2684
   __sys_sendmsg net/socket.c:2716 [inline]
   __do_sys_sendmsg net/socket.c:2721 [inline]
   __se_sys_sendmsg net/socket.c:2719 [inline]
   __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2719
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0xfa/0xfa0 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:5868
                     __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+0x3fa/0x6a0 fs/notify/dnotify/dnotify.c:369
                     do_fcntl+0x6d0/0x1910 fs/fcntl.c:537
                     __do_sys_fcntl fs/fcntl.c:589 [inline]
                     __se_sys_fcntl+0xc8/0x150 fs/fcntl.c:574
                     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                     do_syscall_64+0xfa/0xfa0 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:5868
                          __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:905
                          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_mkdir include/linux/fsnotify.h:404 [inline]
                          vfs_mkdir+0x477/0x510 fs/namei.c:4461
                          do_mkdirat+0x247/0x590 fs/namei.c:4486
                          __do_sys_mkdirat fs/namei.c:4503 [inline]
                          __se_sys_mkdirat fs/namei.c:4501 [inline]
                          __x64_sys_mkdirat+0x87/0xa0 fs/namei.c:4501
                          do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                          do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
                          entry_SYSCALL_64_after_hwframe+0x77/0x7f
  }
  ... key      at: [<ffffffff99a3b880>] file_f_owner_allocate.__key+0x0/0x20
  ... acquired at:
   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
   __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:905
   kill_fasync_rcu fs/fcntl.c:1131 [inline]
   kill_fasync+0x24d/0x4d0 fs/fcntl.c:1146
   lease_break_callback+0x26/0x30 fs/locks.c:558
   __break_lease+0x6a5/0x1620 fs/locks.c:1592
   break_lease include/linux/filelock.h:446 [inline]
   do_dentry_open+0x8b7/0x13f0 fs/open.c:956
   vfs_open+0x3b/0x340 fs/open.c:1097
   do_open fs/namei.c:3975 [inline]
   path_openat+0x2ee5/0x3830 fs/namei.c:4134
   do_filp_open+0x1fa/0x410 fs/namei.c:4161
   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/0xfa0 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:5868
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:326
                   fasync_insert_entry+0xc3/0x270 fs/fcntl.c:1046
                   fasync_add_entry fs/fcntl.c:1085 [inline]
                   fasync_helper+0x52/0xb0 fs/fcntl.c:1103
                   pipe_fasync+0xff/0x1e0 fs/pipe.c:758
                   setfl fs/fcntl.c:76 [inline]
                   do_fcntl+0x1099/0x1910 fs/fcntl.c:476
                   __do_sys_fcntl fs/fcntl.c:589 [inline]
                   __se_sys_fcntl+0xc8/0x150 fs/fcntl.c:574
                   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
                   do_syscall_64+0xfa/0xfa0 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:5868
                        __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:1122 [inline]
                        kill_fasync+0x199/0x4d0 fs/fcntl.c:1146
                        snd_fasync_work_fn+0x162/0x210 sound/core/misc.c:110
                        process_one_work kernel/workqueue.c:3263 [inline]
                        process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
                        worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
                        kthread+0x711/0x8a0 kernel/kthread.c:463
                        ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
                        ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 }
 ... key      at: [<ffffffff99a3b8a0>] fasync_insert_entry.__key+0x0/0x20
 ... acquired at:
   lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
   __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:1122 [inline]
   kill_fasync+0x199/0x4d0 fs/fcntl.c:1146
   tty_wakeup drivers/tty/tty_io.c:515 [inline]
   __start_tty+0x18c/0x220 drivers/tty/tty_io.c:777
   start_tty+0x2b/0x70 drivers/tty/tty_io.c:794
   n_tty_set_termios+0xa7c/0x1090 drivers/tty/n_tty.c:1858
   tty_set_termios+0xda4/0x17e0 drivers/tty/tty_ioctl.c:348
   set_termios+0x516/0x6c0 drivers/tty/tty_ioctl.c:516
   tty_mode_ioctl+0x47e/0x740 drivers/tty/tty_ioctl.c:-1
   tty_ioctl+0x9c6/0xde0 drivers/tty/tty_io.c:2801
   vfs_ioctl fs/ioctl.c:51 [inline]
   __do_sys_ioctl fs/ioctl.c:597 [inline]
   __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
   do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
   do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
   entry_SYSCALL_64_after_hwframe+0x77/0x7f


stack backtrace:
CPU: 0 UID: 0 PID: 20345 Comm: syz.5.4084 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_bad_irq_dependency kernel/locking/lockdep.c:2616 [inline]
 check_irq_usage kernel/locking/lockdep.c:2857 [inline]
 check_prev_add kernel/locking/lockdep.c:3169 [inline]
 check_prevs_add kernel/locking/lockdep.c:3284 [inline]
 validate_chain+0x1f05/0x2140 kernel/locking/lockdep.c:3908
 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237
 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
 __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:1122 [inline]
 kill_fasync+0x199/0x4d0 fs/fcntl.c:1146
 tty_wakeup drivers/tty/tty_io.c:515 [inline]
 __start_tty+0x18c/0x220 drivers/tty/tty_io.c:777
 start_tty+0x2b/0x70 drivers/tty/tty_io.c:794
 n_tty_set_termios+0xa7c/0x1090 drivers/tty/n_tty.c:1858
 tty_set_termios+0xda4/0x17e0 drivers/tty/tty_ioctl.c:348
 set_termios+0x516/0x6c0 drivers/tty/tty_ioctl.c:516
 tty_mode_ioctl+0x47e/0x740 drivers/tty/tty_ioctl.c:-1
 tty_ioctl+0x9c6/0xde0 drivers/tty/tty_io.c:2801
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd486f8eec9
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:00007fd487d73038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fd4871e6090 RCX: 00007fd486f8eec9
RDX: 0000200000000140 RSI: 0000000000005402 RDI: 0000000000000004
RBP: 00007fd487011f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd4871e6128 R14: 00007fd4871e6090 R15: 00007fd48730fa28
 </TASK>

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/14 17:59 upstream 9b332cece987 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/14 09:00 upstream 3a8660878839 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/13 18:09 upstream 3a8660878839 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/13 06:55 upstream 3a8660878839 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/13 06:48 upstream 3a8660878839 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/12 17:31 upstream 8765f467912f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/12 17:30 upstream 8765f467912f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/12 17:30 upstream 8765f467912f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/12 17:23 upstream 8765f467912f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/12 17:23 upstream 8765f467912f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/12 17:22 upstream 8765f467912f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/11 11:31 upstream 0739473694c4 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/11 11:31 upstream 0739473694c4 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/10 07:26 upstream 5472d60c129f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/10 07:26 upstream 5472d60c129f ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/10 00:07 upstream 18a7e218cfcd 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in kbd_event
2025/10/14 05:26 linux-next 52ba76324a9d b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in kbd_event
2025/10/10 07:40 linux-next 0b2f041c47ac ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in kbd_event
* Struck through repros no longer work on HEAD.