syzbot


possible deadlock in input_inject_event

Status: upstream: reported on 2024/09/27 15:01
Subsystems: input kernfs
[Documentation on labels]
Reported-by: syzbot+79c403850e6816dc39cf@syzkaller.appspotmail.com
First crash: 38d, last: 7h12m
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly input report (Oct 2024) 0 (1) 2024/10/03 09:03
[syzbot] [fs?] possible deadlock in input_inject_event 0 (1) 2024/09/27 15:01

Sample crash report:
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
6.12.0-rc2-syzkaller-00006-g87d6aab2389e #0 Not tainted
-----------------------------------------------------
syz.2.1069/7885 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff888026f011a0 (&f_owner->lock){....}-{2:2}, at: send_sigio+0x37/0x390 fs/fcntl.c:910

and this task is already holding:
ffff888030b122b8 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1127 [inline]
ffff888030b122b8 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x199/0x4f0 fs/fcntl.c:1151
which would create a new lock dependency:
 (&new->fa_lock){....}-{2:2} -> (&f_owner->lock){....}-{2:2}

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

... which became SOFTIRQ-irq-safe at:
  lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
  __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
  _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
  input_inject_event+0xc5/0x340 drivers/input/input.c:423
  kd_sound_helper+0x101/0x210 drivers/tty/vt/keyboard.c:256
  input_handler_for_each_handle+0x103/0x1d0 drivers/input/input.c:2676
  call_timer_fn+0x18e/0x650 kernel/time/timer.c:1794
  expire_timers kernel/time/timer.c:1845 [inline]
  __run_timers kernel/time/timer.c:2419 [inline]
  __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430
  run_timer_base kernel/time/timer.c:2439 [inline]
  run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449
  handle_softirqs+0x2c5/0x980 kernel/softirq.c:554
  do_softirq+0x11b/0x1e0 kernel/softirq.c:455
  __local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:382
  spin_unlock_bh include/linux/spinlock.h:396 [inline]
  ieee80211_ibss_work+0x303/0x14c0 net/mac80211/ibss.c:1664
  cfg80211_wiphy_work+0x2db/0x490 net/wireless/core.c:440
  process_one_work kernel/workqueue.c:3229 [inline]
  process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
  worker_thread+0x870/0xd30 kernel/workqueue.c:3391
  kthread+0x2f0/0x390 kernel/kthread.c:389
  ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

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

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
  __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
  _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
  __do_wait+0x12d/0x850 kernel/exit.c:1648
  do_wait+0x1e9/0x560 kernel/exit.c:1692
  kernel_wait+0xe9/0x240 kernel/exit.c:1868
  call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
  call_usermodehelper_exec_work+0xbd/0x230 kernel/umh.c:164
  process_one_work kernel/workqueue.c:3229 [inline]
  process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
  worker_thread+0x870/0xd30 kernel/workqueue.c:3391
  kthread+0x2f0/0x390 kernel/kthread.c:389
  ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

other info that might help us debug this:

Chain exists of:
  &dev->event_lock#2 --> &new->fa_lock --> tasklist_lock

 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(tasklist_lock);
                               local_irq_disable();
                               lock(&dev->event_lock#2);
                               lock(&new->fa_lock);
  <Interrupt>
    lock(&dev->event_lock#2);

 *** DEADLOCK ***

4 locks held by syz.2.1069/7885:
 #0: ffffffff8eaa2630 (file_rwsem){++++}-{0:0}, at: __break_lease+0x3b3/0x1820 fs/locks.c:1563
 #1: ffff8880281864e8 (&ctx->flc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #1: ffff8880281864e8 (&ctx->flc_lock){+.+.}-{2:2}, at: __break_lease+0x3c0/0x1820 fs/locks.c:1564
 #2: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #2: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #2: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x54/0x4f0 fs/fcntl.c:1150
 #3: ffff888030b122b8 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1127 [inline]
 #3: ffff888030b122b8 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x199/0x4f0 fs/fcntl.c:1151

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
  -> (&dev->event_lock#2){..-.}-{2:2} {
     IN-SOFTIRQ-W at:
                        lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                        __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                        _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
                        input_inject_event+0xc5/0x340 drivers/input/input.c:423
                        kd_sound_helper+0x101/0x210 drivers/tty/vt/keyboard.c:256
                        input_handler_for_each_handle+0x103/0x1d0 drivers/input/input.c:2676
                        call_timer_fn+0x18e/0x650 kernel/time/timer.c:1794
                        expire_timers kernel/time/timer.c:1845 [inline]
                        __run_timers kernel/time/timer.c:2419 [inline]
                        __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430
                        run_timer_base kernel/time/timer.c:2439 [inline]
                        run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449
                        handle_softirqs+0x2c5/0x980 kernel/softirq.c:554
                        do_softirq+0x11b/0x1e0 kernel/softirq.c:455
                        __local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:382
                        spin_unlock_bh include/linux/spinlock.h:396 [inline]
                        ieee80211_ibss_work+0x303/0x14c0 net/mac80211/ibss.c:1664
                        cfg80211_wiphy_work+0x2db/0x490 net/wireless/core.c:440
                        process_one_work kernel/workqueue.c:3229 [inline]
                        process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
                        worker_thread+0x870/0xd30 kernel/workqueue.c:3391
                        kthread+0x2f0/0x390 kernel/kthread.c:389
                        ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
                        ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
     INITIAL USE at:
                       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                       __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                       _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
                       input_inject_event+0xc5/0x340 drivers/input/input.c:423
                       kbd_led_trigger_activate+0xb8/0x100 drivers/tty/vt/keyboard.c:1036
                       led_trigger_set+0x582/0x9c0 drivers/leds/led-triggers.c:212
                       led_match_default_trigger drivers/leds/led-triggers.c:269 [inline]
                       led_trigger_set_default+0x229/0x260 drivers/leds/led-triggers.c:287
                       led_classdev_register_ext+0x6e6/0x8a0 drivers/leds/led-class.c:555
                       led_classdev_register include/linux/leds.h:273 [inline]
                       input_leds_connect+0x489/0x630 drivers/input/input-leds.c:145
                       input_attach_handler drivers/input/input.c:1027 [inline]
                       input_register_device+0xd3b/0x1110 drivers/input/input.c:2470
                       atkbd_connect+0x752/0xa00 drivers/input/keyboard/atkbd.c:1340
                       serio_connect_driver drivers/input/serio/serio.c:44 [inline]
                       serio_driver_probe+0x7f/0xa0 drivers/input/serio/serio.c:775
                       really_probe+0x2b8/0xad0 drivers/base/dd.c:658
                       __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800
                       driver_probe_device+0x50/0x430 drivers/base/dd.c:830
                       __driver_attach+0x45f/0x710 drivers/base/dd.c:1216
                       bus_for_each_dev+0x239/0x2b0 drivers/base/bus.c:370
                       serio_attach_driver drivers/input/serio/serio.c:804 [inline]
                       serio_handle_event+0x1c7/0x920 drivers/input/serio/serio.c:224
                       process_one_work kernel/workqueue.c:3229 [inline]
                       process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
                       worker_thread+0x870/0xd30 kernel/workqueue.c:3391
                       kthread+0x2f0/0x390 kernel/kthread.c:389
                       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
                       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
   }
   ... key      at: [<ffffffff9a718620>] input_allocate_device.__key.5+0x0/0x20
 -> (&client->buffer_lock){....}-{2:2} {
    INITIAL USE at:
                     lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                     __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+0xf2/0xad0 drivers/input/evdev.c:261
                     evdev_events+0x1c2/0x300 drivers/input/evdev.c:306
                     input_pass_values+0x286/0x860 drivers/input/input.c:126
                     input_event_dispose+0x30f/0x600 drivers/input/input.c:341
                     input_handle_event+0xa71/0xbe0 drivers/input/input.c:369
                     input_inject_event+0x22f/0x340 drivers/input/input.c:428
                     evdev_write+0x5fd/0x790 drivers/input/evdev.c:528
                     vfs_write+0x29c/0xc90 fs/read_write.c:681
                     ksys_write+0x183/0x2b0 fs/read_write.c:736
                     do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                     do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
                     entry_SYSCALL_64_after_hwframe+0x77/0x7f
  }
  ... key      at: [<ffffffff9a7188c0>] evdev_open.__key.24+0x0/0x20
  ... acquired at:
   lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
   __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+0xf2/0xad0 drivers/input/evdev.c:261
   evdev_events+0x1c2/0x300 drivers/input/evdev.c:306
   input_pass_values+0x286/0x860 drivers/input/input.c:126
   input_event_dispose+0x30f/0x600 drivers/input/input.c:341
   input_handle_event+0xa71/0xbe0 drivers/input/input.c:369
   input_inject_event+0x22f/0x340 drivers/input/input.c:428
   evdev_write+0x5fd/0x790 drivers/input/evdev.c:528
   vfs_write+0x29c/0xc90 fs/read_write.c:681
   ksys_write+0x183/0x2b0 fs/read_write.c:736
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
   entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> (&new->fa_lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0xd3/0x120 kernel/locking/spinlock.c:326
                   fasync_remove_entry+0xff/0x1d0 fs/fcntl.c:1004
                   __fput+0x71b/0x880 fs/file_table.c:428
                   task_work_run+0x24f/0x310 kernel/task_work.c:228
                   resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
                   exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
                   exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
                   __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
                   syscall_exit_to_user_mode+0x168/0x370 kernel/entry/common.c:218
                   do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
   INITIAL READ USE at:
                        lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0xdd/0x130 kernel/locking/spinlock.c:236
                        kill_fasync_rcu fs/fcntl.c:1127 [inline]
                        kill_fasync+0x199/0x4f0 fs/fcntl.c:1151
                        __pass_event drivers/input/evdev.c:240 [inline]
                        evdev_pass_values+0x58a/0xad0 drivers/input/evdev.c:278
                        evdev_events+0x1c2/0x300 drivers/input/evdev.c:306
                        input_pass_values+0x286/0x860 drivers/input/input.c:126
                        input_event_dispose+0x30f/0x600 drivers/input/input.c:341
                        input_handle_event+0xa71/0xbe0 drivers/input/input.c:369
                        input_inject_event+0x22f/0x340 drivers/input/input.c:428
                        evdev_write+0x5fd/0x790 drivers/input/evdev.c:528
                        vfs_write+0x29c/0xc90 fs/read_write.c:681
                        ksys_write+0x183/0x2b0 fs/read_write.c:736
                        do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                        do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
                        entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff9a408e80>] fasync_insert_entry.__key+0x0/0x20
 ... acquired at:
   lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0xdd/0x130 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:1127 [inline]
   kill_fasync+0x199/0x4f0 fs/fcntl.c:1151
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values+0x58a/0xad0 drivers/input/evdev.c:278
   evdev_events+0x1c2/0x300 drivers/input/evdev.c:306
   input_pass_values+0x286/0x860 drivers/input/input.c:126
   input_event_dispose+0x30f/0x600 drivers/input/input.c:341
   input_handle_event+0xa71/0xbe0 drivers/input/input.c:369
   input_inject_event+0x22f/0x340 drivers/input/input.c:428
   evdev_write+0x5fd/0x790 drivers/input/evdev.c:528
   vfs_write+0x29c/0xc90 fs/read_write.c:681
   ksys_write+0x183/0x2b0 fs/read_write.c:736
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
   entry_SYSCALL_64_after_hwframe+0x77/0x7f


the dependencies between the lock to be acquired
 and SOFTIRQ-irq-unsafe lock:
 -> (tasklist_lock){.+.+}-{2:2} {
    HARDIRQ-ON-R at:
                      lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                      __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                      _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
                      __do_wait+0x12d/0x850 kernel/exit.c:1648
                      do_wait+0x1e9/0x560 kernel/exit.c:1692
                      kernel_wait+0xe9/0x240 kernel/exit.c:1868
                      call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
                      call_usermodehelper_exec_work+0xbd/0x230 kernel/umh.c:164
                      process_one_work kernel/workqueue.c:3229 [inline]
                      process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
                      worker_thread+0x870/0xd30 kernel/workqueue.c:3391
                      kthread+0x2f0/0x390 kernel/kthread.c:389
                      ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
                      ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
    SOFTIRQ-ON-R at:
                      lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                      __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                      _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
                      __do_wait+0x12d/0x850 kernel/exit.c:1648
                      do_wait+0x1e9/0x560 kernel/exit.c:1692
                      kernel_wait+0xe9/0x240 kernel/exit.c:1868
                      call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
                      call_usermodehelper_exec_work+0xbd/0x230 kernel/umh.c:164
                      process_one_work kernel/workqueue.c:3229 [inline]
                      process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
                      worker_thread+0x870/0xd30 kernel/workqueue.c:3391
                      kthread+0x2f0/0x390 kernel/kthread.c:389
                      ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
                      ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
    INITIAL USE at:
                     lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                     _raw_write_lock_irq+0xd3/0x120 kernel/locking/spinlock.c:326
                     copy_process+0x2267/0x3d50 kernel/fork.c:2500
                     kernel_clone+0x223/0x880 kernel/fork.c:2784
                     user_mode_thread+0x132/0x1a0 kernel/fork.c:2862
                     rest_init+0x23/0x300 init/main.c:712
                     start_kernel+0x47f/0x500 init/main.c:1105
                     x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507
                     x86_64_start_kernel+0x9f/0xa0 arch/x86/kernel/head64.c:488
                     common_startup_64+0x13e/0x147
    INITIAL READ USE at:
                          lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                          __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                          _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
                          __do_wait+0x12d/0x850 kernel/exit.c:1648
                          do_wait+0x1e9/0x560 kernel/exit.c:1692
                          kernel_wait+0xe9/0x240 kernel/exit.c:1868
                          call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
                          call_usermodehelper_exec_work+0xbd/0x230 kernel/umh.c:164
                          process_one_work kernel/workqueue.c:3229 [inline]
                          process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
                          worker_thread+0x870/0xd30 kernel/workqueue.c:3391
                          kthread+0x2f0/0x390 kernel/kthread.c:389
                          ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
                          ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
  }
  ... key      at: [<ffffffff8e60a058>] tasklist_lock+0x18/0x40
  ... acquired at:
   lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
   __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
   _raw_read_lock+0x36/0x50 kernel/locking/spinlock.c:228
   send_sigurg+0x144/0x430 fs/fcntl.c:970
   sk_send_sigurg+0x6e/0x2f0 net/core/sock.c:3500
   queue_oob+0x4e3/0x680 net/unix/af_unix.c:2233
   unix_stream_sendmsg+0xd24/0xf80 net/unix/af_unix.c:2351
   sock_sendmsg_nosec net/socket.c:729 [inline]
   __sock_sendmsg+0x221/0x270 net/socket.c:744
   ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2602
   ___sys_sendmsg net/socket.c:2656 [inline]
   __sys_sendmsg+0x292/0x380 net/socket.c:2685
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
   entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> (&f_owner->lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0xd3/0x120 kernel/locking/spinlock.c:326
                   __f_setown+0x6b/0x380 fs/fcntl.c:137
                   fcntl_dirnotify+0x4cf/0x790 fs/notify/dnotify/dnotify.c:372
                   do_fcntl+0x7e2/0x1a60 fs/fcntl.c:534
                   __do_sys_fcntl fs/fcntl.c:586 [inline]
                   __se_sys_fcntl+0xd2/0x1e0 fs/fcntl.c:571
                   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                   do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
   INITIAL READ USE at:
                        lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0xdd/0x130 kernel/locking/spinlock.c:236
                        send_sigio+0x37/0x390 fs/fcntl.c:910
                        dnotify_handle_event+0x157/0x460 fs/notify/dnotify/dnotify.c:114
                        fsnotify_handle_event fs/notify/fsnotify.c:350 [inline]
                        send_to_group fs/notify/fsnotify.c:398 [inline]
                        fsnotify+0x1946/0x1f60 fs/notify/fsnotify.c:607
                        fsnotify_name include/linux/fsnotify.h:55 [inline]
                        fsnotify_dirent include/linux/fsnotify.h:61 [inline]
                        fsnotify_create include/linux/fsnotify.h:278 [inline]
                        open_last_lookups fs/namei.c:3697 [inline]
                        path_openat+0x1686/0x3590 fs/namei.c:3930
                        do_filp_open+0x235/0x490 fs/namei.c:3960
                        do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
                        do_sys_open fs/open.c:1430 [inline]
                        __do_sys_openat fs/open.c:1446 [inline]
                        __se_sys_openat fs/open.c:1441 [inline]
                        __x64_sys_openat+0x247/0x2a0 fs/open.c:1441
                        do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                        do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
                        entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff9a408e60>] file_f_owner_allocate.__key+0x0/0x20
 ... acquired at:
   lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0xdd/0x130 kernel/locking/spinlock.c:236
   send_sigio+0x37/0x390 fs/fcntl.c:910
   kill_fasync_rcu fs/fcntl.c:1136 [inline]
   kill_fasync+0x256/0x4f0 fs/fcntl.c:1151
   lease_break_callback+0x26/0x30 fs/locks.c:558
   __break_lease+0x6d5/0x1820 fs/locks.c:1592
   break_lease include/linux/filelock.h:436 [inline]
   do_dentry_open+0x8d4/0x1460 fs/open.c:949
   vfs_open+0x3e/0x330 fs/open.c:1088
   do_open fs/namei.c:3774 [inline]
   path_openat+0x2c84/0x3590 fs/namei.c:3933
   do_filp_open+0x235/0x490 fs/namei.c:3960
   do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
   do_sys_open fs/open.c:1430 [inline]
   __do_sys_openat fs/open.c:1446 [inline]
   __se_sys_openat fs/open.c:1441 [inline]
   __x64_sys_openat+0x247/0x2a0 fs/open.c:1441
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
   entry_SYSCALL_64_after_hwframe+0x77/0x7f


stack backtrace:
CPU: 0 UID: 0 PID: 7885 Comm: syz.2.1069 Not tainted 6.12.0-rc2-syzkaller-00006-g87d6aab2389e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_bad_irq_dependency kernel/locking/lockdep.c:2647 [inline]
 check_irq_usage kernel/locking/lockdep.c:2888 [inline]
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3280 [inline]
 validate_chain+0x4ebd/0x5920 kernel/locking/lockdep.c:3904
 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
 _raw_read_lock_irqsave+0xdd/0x130 kernel/locking/spinlock.c:236
 send_sigio+0x37/0x390 fs/fcntl.c:910
 kill_fasync_rcu fs/fcntl.c:1136 [inline]
 kill_fasync+0x256/0x4f0 fs/fcntl.c:1151
 lease_break_callback+0x26/0x30 fs/locks.c:558
 __break_lease+0x6d5/0x1820 fs/locks.c:1592
 break_lease include/linux/filelock.h:436 [inline]
 do_dentry_open+0x8d4/0x1460 fs/open.c:949
 vfs_open+0x3e/0x330 fs/open.c:1088
 do_open fs/namei.c:3774 [inline]
 path_openat+0x2c84/0x3590 fs/namei.c:3933
 do_filp_open+0x235/0x490 fs/namei.c:3960
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_openat fs/open.c:1446 [inline]
 __se_sys_openat fs/open.c:1441 [inline]
 __x64_sys_openat+0x247/0x2a0 fs/open.c:1441
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4ad817dff9
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:00007f4ad8e9c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f4ad8335f80 RCX: 00007f4ad817dff9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: ffffffffffffff9c
RBP: 00007f4ad81f0296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f4ad8335f80 R15: 00007ffde846ea78
 </TASK>

Crashes (149):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/08 02:26 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/07 00:10 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/06 12:14 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/06 10:18 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/06 06:05 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/05 23:49 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in input_inject_event
2024/10/05 22:46 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/05 21:03 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/05 11:50 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/05 09:14 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/05 02:07 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/04 19:07 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in input_inject_event
2024/10/04 15:10 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/04 08:41 upstream 8c245fe7dde3 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/04 05:40 upstream 8c245fe7dde3 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/04 01:53 upstream 8c245fe7dde3 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/03 13:13 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/03 00:23 upstream f23aa4c0761a a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/30 09:37 upstream 9852d85ec9d4 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/09/29 11:59 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/29 06:10 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/28 12:45 upstream ad46e8f95e93 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/28 10:24 upstream ad46e8f95e93 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/19 15:26 upstream 2a17bb8c204f 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/09/17 16:32 upstream fc1dc0d50780 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/09/17 13:20 upstream a430d95c5efa c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/16 21:14 upstream adfc3ded5c33 49cf0773 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/16 19:53 upstream adfc3ded5c33 49cf0773 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/09/16 14:15 upstream adfc3ded5c33 49cf0773 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/16 05:10 upstream 98f7e32f20d2 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/15 05:19 upstream 0babf683783d 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/15 01:28 upstream 0babf683783d 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/15 00:21 upstream 0babf683783d ff60e2ca .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/14 19:29 upstream b7718454f937 ff60e2ca .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/14 07:00 upstream b7718454f937 ff60e2ca .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/13 19:57 upstream e936e7d4a83b 158f4851 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/13 15:49 upstream 196145c606d0 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/13 01:08 upstream 196145c606d0 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/12 11:37 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/11 21:40 upstream 7c6a3a65ace7 d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/10 20:09 upstream 8d8d276ba2fb 79eef296 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/10 20:08 upstream 8d8d276ba2fb 79eef296 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/09/10 10:56 upstream bc83b4d1f086 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in input_inject_event
2024/09/03 22:43 upstream 88fac17500f4 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/08/31 06:52 upstream 1934261d8974 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/08 05:30 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/07 07:51 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/05 04:41 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/03 18:09 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/09/11 11:58 upstream 8d8d276ba2fb 9326a104 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/07 11:16 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in input_inject_event
2024/10/05 19:06 upstream fc20a3e57247 d7906eff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in input_inject_event
2024/09/10 21:51 upstream 8d8d276ba2fb e1ac59f4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in input_inject_event
2024/10/07 14:38 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in input_inject_event
2024/10/06 03:53 upstream fc20a3e57247 d7906eff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in input_inject_event
2024/10/06 02:02 upstream fc20a3e57247 d7906eff .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in input_inject_event
* Struck through repros no longer work on HEAD.