syzbot


possible deadlock in input_inject_event

Status: upstream: reported on 2024/09/27 15:01
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+79c403850e6816dc39cf@syzkaller.appspotmail.com
First crash: 64d, last: 1h47m
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly kernfs report (Oct 2024) 0 (1) 2024/10/15 10:07
[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-rc5-syzkaller-00308-g3e5e6c9900c3 #0 Not tainted
-----------------------------------------------------
syz.1.2386/17111 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff888028fabaa0 (&f_owner->lock
){....}-{2:2}, at: send_sigio+0x31/0x3e0 fs/fcntl.c:910

and this task is already holding:
ffff888029fb8168 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1127 [inline]
ffff888029fb8168 (&new->fa_lock){....}-{2:2}, at: kill_fasync fs/fcntl.c:1151 [inline]
ffff888029fb8168 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x138/0x520 fs/fcntl.c:1144
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.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
  __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
  _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
  input_inject_event+0xa4/0x370 drivers/input/input.c:423
  __led_set_brightness drivers/leds/led-core.c:52 [inline]
  led_set_brightness_nopm drivers/leds/led-core.c:323 [inline]
  led_set_brightness_nosleep drivers/leds/led-core.c:354 [inline]
  led_set_brightness+0x214/0x290 drivers/leds/led-core.c:316
  led_trigger_event drivers/leds/led-triggers.c:407 [inline]
  led_trigger_event+0xda/0x270 drivers/leds/led-triggers.c:395
  kbd_propagate_led_state drivers/tty/vt/keyboard.c:1080 [inline]
  kbd_bh+0x21b/0x300 drivers/tty/vt/keyboard.c:1269
  tasklet_action_common+0x24f/0x3e0 kernel/softirq.c:784
  handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
  __do_softirq kernel/softirq.c:588 [inline]
  invoke_softirq kernel/softirq.c:428 [inline]
  __irq_exit_rcu kernel/softirq.c:637 [inline]
  irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
  instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
  sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
  asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
  __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline]
  _raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
  csi_ECMA drivers/tty/vt/vt.c:2516 [inline]
  do_con_trol drivers/tty/vt/vt.c:2657 [inline]
  do_con_write+0x3e8e/0x7bb0 drivers/tty/vt/vt.c:3092
  con_write+0x23/0xb0 drivers/tty/vt/vt.c:3434
  process_output_block drivers/tty/n_tty.c:574 [inline]
  n_tty_write+0x41c/0x1140 drivers/tty/n_tty.c:2389
  iterate_tty_write drivers/tty/tty_io.c:1015 [inline]
  file_tty_write.constprop.0+0x509/0x9a0 drivers/tty/tty_io.c:1090
  new_sync_write fs/read_write.c:590 [inline]
  vfs_write+0x5b1/0x1150 fs/read_write.c:683
  ksys_write+0x12f/0x260 fs/read_write.c:736
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
  entry_SYSCALL_64_after_hwframe+0x77/0x7f

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

... which became SOFTIRQ-irq-unsafe at:
...
  lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
  __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
  _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228
  __do_wait+0x105/0x890 kernel/exit.c:1648
  do_wait+0x219/0x570 kernel/exit.c:1692
  kernel_wait+0xa0/0x160 kernel/exit.c:1868
  call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
  call_usermodehelper_exec_work+0xf1/0x170 kernel/umh.c:164
  process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
  process_scheduled_works kernel/workqueue.c:3310 [inline]
  worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
  kthread+0x2c4/0x3a0 kernel/kthread.c:389
  ret_from_fork+0x48/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.1.2386/17111:
 #0: ffff888060620258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1611 [inline]
 #0: ffff888060620258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: tcp_sendmsg+0x20/0x50 net/ipv4/tcp.c:1356
 #1: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #1: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #1: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: sock_def_readable+0xa7/0x610 net/core/sock.c:3439
 #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: kill_fasync fs/fcntl.c:1150 [inline]
 #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x6d/0x520 fs/fcntl.c:1144
 #3: ffff888029fb8168 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1127 [inline]
 #3: ffff888029fb8168 (&new->fa_lock){....}-{2:2}, at: kill_fasync fs/fcntl.c:1151 [inline]
 #3: ffff888029fb8168 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x138/0x520 fs/fcntl.c:1144

the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
 -> (&dev->event_lock#2){..-.}-{2:2} {
    IN-SOFTIRQ-W at:
                      lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                      __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                      _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
                      input_inject_event+0xa4/0x370 drivers/input/input.c:423
                      __led_set_brightness drivers/leds/led-core.c:52 [inline]
                      led_set_brightness_nopm drivers/leds/led-core.c:323 [inline]
                      led_set_brightness_nosleep drivers/leds/led-core.c:354 [inline]
                      led_set_brightness+0x214/0x290 drivers/leds/led-core.c:316
                      led_trigger_event drivers/leds/led-triggers.c:407 [inline]
                      led_trigger_event+0xda/0x270 drivers/leds/led-triggers.c:395
                      kbd_propagate_led_state drivers/tty/vt/keyboard.c:1080 [inline]
                      kbd_bh+0x21b/0x300 drivers/tty/vt/keyboard.c:1269
                      tasklet_action_common+0x24f/0x3e0 kernel/softirq.c:784
                      handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
                      __do_softirq kernel/softirq.c:588 [inline]
                      invoke_softirq kernel/softirq.c:428 [inline]
                      __irq_exit_rcu kernel/softirq.c:637 [inline]
                      irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
                      instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
                      sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
                      asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
                      __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline]
                      _raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
                      csi_ECMA drivers/tty/vt/vt.c:2516 [inline]
                      do_con_trol drivers/tty/vt/vt.c:2657 [inline]
                      do_con_write+0x3e8e/0x7bb0 drivers/tty/vt/vt.c:3092
                      con_write+0x23/0xb0 drivers/tty/vt/vt.c:3434
                      process_output_block drivers/tty/n_tty.c:574 [inline]
                      n_tty_write+0x41c/0x1140 drivers/tty/n_tty.c:2389
                      iterate_tty_write drivers/tty/tty_io.c:1015 [inline]
                      file_tty_write.constprop.0+0x509/0x9a0 drivers/tty/tty_io.c:1090
                      new_sync_write fs/read_write.c:590 [inline]
                      vfs_write+0x5b1/0x1150 fs/read_write.c:683
                      ksys_write+0x12f/0x260 fs/read_write.c:736
                      do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                      do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
                      entry_SYSCALL_64_after_hwframe+0x77/0x7f
    INITIAL USE at:
                     lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                     __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                     _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
                     input_inject_event+0xa4/0x370 drivers/input/input.c:423
                     __led_set_brightness drivers/leds/led-core.c:52 [inline]
                     led_set_brightness_nopm drivers/leds/led-core.c:323 [inline]
                     led_set_brightness_nosleep drivers/leds/led-core.c:354 [inline]
                     led_set_brightness+0x214/0x290 drivers/leds/led-core.c:316
                     kbd_led_trigger_activate+0xcb/0x110 drivers/tty/vt/keyboard.c:1036
                     led_trigger_set+0x59d/0xc60 drivers/leds/led-triggers.c:212
                     led_match_default_trigger drivers/leds/led-triggers.c:269 [inline]
                     led_match_default_trigger drivers/leds/led-triggers.c:263 [inline]
                     led_trigger_set_default drivers/leds/led-triggers.c:287 [inline]
                     led_trigger_set_default+0x1bd/0x2a0 drivers/leds/led-triggers.c:276
                     led_classdev_register_ext+0x78c/0x9e0 drivers/leds/led-class.c:555
                     led_classdev_register include/linux/leds.h:273 [inline]
                     input_leds_connect+0x552/0x8e0 drivers/input/input-leds.c:145
                     input_attach_handler.isra.0+0x184/0x260 drivers/input/input.c:1027
                     input_register_device+0xa84/0x1110 drivers/input/input.c:2470
                     atkbd_connect+0x5e2/0xa20 drivers/input/keyboard/atkbd.c:1340
                     serio_connect_driver drivers/input/serio/serio.c:44 [inline]
                     serio_driver_probe+0x77/0xa0 drivers/input/serio/serio.c:775
                     call_driver_probe drivers/base/dd.c:579 [inline]
                     really_probe+0x241/0xa90 drivers/base/dd.c:658
                     __driver_probe_device+0x1de/0x440 drivers/base/dd.c:800
                     driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830
                     __driver_attach+0x283/0x580 drivers/base/dd.c:1216
                     bus_for_each_dev+0x13f/0x1d0 drivers/base/bus.c:370
                     serio_attach_driver drivers/input/serio/serio.c:804 [inline]
                     serio_handle_event+0x2bb/0xa90 drivers/input/serio/serio.c:224
                     process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
                     process_scheduled_works kernel/workqueue.c:3310 [inline]
                     worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
                     kthread+0x2c4/0x3a0 kernel/kthread.c:389
                     ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
                     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
  }
  ... key      at: [<ffffffff9ab27a00>] __key.7+0x0/0x40
-> (&new->fa_lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0x36/0x50 kernel/locking/spinlock.c:326
                   fasync_remove_entry+0xb9/0x1e0 fs/fcntl.c:1004
                   fasync_helper+0xaf/0xd0 fs/fcntl.c:1107
                   sock_fasync+0x92/0x140 net/socket.c:1451
                   __fput+0x95b/0xb60 fs/file_table.c:428
                   task_work_run+0x151/0x250 kernel/task_work.c:239
                   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+0x27b/0x2a0 kernel/entry/common.c:218
                   do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
   INITIAL READ USE at:
                        lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0x74/0x90 kernel/locking/spinlock.c:236
                        kill_fasync_rcu fs/fcntl.c:1127 [inline]
                        kill_fasync fs/fcntl.c:1151 [inline]
                        kill_fasync+0x138/0x520 fs/fcntl.c:1144
                        sock_wake_async+0x132/0x160 net/socket.c:1480
                        sk_wake_async_rcu include/net/sock.h:2452 [inline]
                        sk_wake_async_rcu include/net/sock.h:2449 [inline]
                        sock_def_error_report+0x352/0x400 net/core/sock.c:3429
                        sk_error_report+0x41/0x2a0 net/core/sock.c:348
                        tcp_disconnect+0x1410/0x1e90 net/ipv4/tcp.c:3401
                        inet_shutdown+0x26f/0x440 net/ipv4/af_inet.c:937
                        __sys_shutdown_sock net/socket.c:2448 [inline]
                        __sys_shutdown_sock net/socket.c:2442 [inline]
                        __sys_shutdown+0x102/0x1c0 net/socket.c:2460
                        __do_sys_shutdown net/socket.c:2468 [inline]
                        __se_sys_shutdown net/socket.c:2466 [inline]
                        __x64_sys_shutdown+0x53/0x80 net/socket.c:2466
                        do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                        do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
                        entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff9a856600>] __key.0+0x0/0x40
 ... acquired at:
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0x74/0x90 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:1127 [inline]
   kill_fasync fs/fcntl.c:1151 [inline]
   kill_fasync+0x138/0x520 fs/fcntl.c:1144
   mousedev_notify_readers+0x6d9/0xa30 drivers/input/mousedev.c:309
   mousedev_event+0x84e/0x1490 drivers/input/mousedev.c:394
   input_handler_events_default+0x119/0x1b0 drivers/input/input.c:2549
   input_pass_values+0x77a/0x8e0 drivers/input/input.c:126
   input_event_dispose drivers/input/input.c:341 [inline]
   input_handle_event+0xf0b/0x14d0 drivers/input/input.c:369
   input_inject_event+0x1bb/0x370 drivers/input/input.c:428
   evdev_write+0x44f/0x750 drivers/input/evdev.c:528
   vfs_write+0x24f/0x1150 fs/read_write.c:681
   ksys_write+0x1fa/0x260 fs/read_write.c:736
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xcd/0x250 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.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                      __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                      _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228
                      __do_wait+0x105/0x890 kernel/exit.c:1648
                      do_wait+0x219/0x570 kernel/exit.c:1692
                      kernel_wait+0xa0/0x160 kernel/exit.c:1868
                      call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
                      call_usermodehelper_exec_work+0xf1/0x170 kernel/umh.c:164
                      process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
                      process_scheduled_works kernel/workqueue.c:3310 [inline]
                      worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
                      kthread+0x2c4/0x3a0 kernel/kthread.c:389
                      ret_from_fork+0x48/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.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                      __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                      _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228
                      __do_wait+0x105/0x890 kernel/exit.c:1648
                      do_wait+0x219/0x570 kernel/exit.c:1692
                      kernel_wait+0xa0/0x160 kernel/exit.c:1868
                      call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
                      call_usermodehelper_exec_work+0xf1/0x170 kernel/umh.c:164
                      process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
                      process_scheduled_works kernel/workqueue.c:3310 [inline]
                      worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
                      kthread+0x2c4/0x3a0 kernel/kthread.c:389
                      ret_from_fork+0x48/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.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                     _raw_write_lock_irq+0x36/0x50 kernel/locking/spinlock.c:326
                     copy_process+0x4181/0x8cb0 kernel/fork.c:2500
                     kernel_clone+0xfd/0x960 kernel/fork.c:2784
                     user_mode_thread+0xb4/0xf0 kernel/fork.c:2862
                     rest_init+0x23/0x2b0 init/main.c:712
                     start_kernel+0x3e4/0x4d0 init/main.c:1105
                     x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507
                     x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488
                     common_startup_64+0x13e/0x148
    INITIAL READ USE at:
                          lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                          __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                          _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228
                          __do_wait+0x105/0x890 kernel/exit.c:1648
                          do_wait+0x219/0x570 kernel/exit.c:1692
                          kernel_wait+0xa0/0x160 kernel/exit.c:1868
                          call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
                          call_usermodehelper_exec_work+0xf1/0x170 kernel/umh.c:164
                          process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
                          process_scheduled_works kernel/workqueue.c:3310 [inline]
                          worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
                          kthread+0x2c4/0x3a0 kernel/kthread.c:389
                          ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
                          ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
  }
  ... key      at: [<ffffffff8de0a098>] tasklist_lock+0x18/0x40
  ... acquired at:
   __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
   _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228
   send_sigurg+0xf3/0xc80 fs/fcntl.c:970
   sk_send_sigurg+0x76/0x360 net/core/sock.c:3500
   tcp_check_urg net/ipv4/tcp_input.c:5865 [inline]
   tcp_urg+0x343/0xb80 net/ipv4/tcp_input.c:5906
   tcp_rcv_established+0x8a6/0x21c0 net/ipv4/tcp_input.c:6261
   tcp_v6_do_rcv+0x83c/0x16e0 net/ipv6/tcp_ipv6.c:1641
   sk_backlog_rcv include/net/sock.h:1115 [inline]
   __release_sock+0x14c/0x400 net/core/sock.c:3072
   release_sock+0x5a/0x220 net/core/sock.c:3626
   tcp_sendmsg+0x38/0x50 net/ipv4/tcp.c:1358
   inet6_sendmsg+0xb9/0x140 net/ipv6/af_inet6.c:661
   sock_sendmsg_nosec net/socket.c:729 [inline]
   __sock_sendmsg net/socket.c:744 [inline]
   __sys_sendto+0x36b/0x4d0 net/socket.c:2214
   __do_sys_sendto net/socket.c:2226 [inline]
   __se_sys_sendto net/socket.c:2222 [inline]
   __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2222
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
   entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> (&f_owner->lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0x36/0x50 kernel/locking/spinlock.c:326
                   __f_setown+0x67/0x3c0 fs/fcntl.c:137
                   fcntl_dirnotify+0x92f/0xcb0 fs/notify/dnotify/dnotify.c:372
                   do_fcntl+0xe00/0x1510 fs/fcntl.c:534
                   __do_sys_fcntl fs/fcntl.c:586 [inline]
                   __se_sys_fcntl fs/fcntl.c:571 [inline]
                   __x64_sys_fcntl+0x176/0x210 fs/fcntl.c:571
                   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                   do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
                   entry_SYSCALL_64_after_hwframe+0x77/0x7f
   INITIAL READ USE at:
                        lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
                        __raw_read_lock_irq include/linux/rwlock_api_smp.h:169 [inline]
                        _raw_read_lock_irq+0x67/0x80 kernel/locking/spinlock.c:244
                        f_getown_ex fs/fcntl.c:271 [inline]
                        do_fcntl+0x45b/0x1510 fs/fcntl.c:513
                        __do_sys_fcntl fs/fcntl.c:586 [inline]
                        __se_sys_fcntl fs/fcntl.c:571 [inline]
                        __x64_sys_fcntl+0x176/0x210 fs/fcntl.c:571
                        do_syscall_x64 arch/x86/entry/common.c:52 [inline]
                        do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
                        entry_SYSCALL_64_after_hwframe+0x77/0x7f
 }
 ... key      at: [<ffffffff9a856640>] __key.1+0x0/0x40
 ... acquired at:
   lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0x74/0x90 kernel/locking/spinlock.c:236
   send_sigio+0x31/0x3e0 fs/fcntl.c:910
   kill_fasync_rcu fs/fcntl.c:1136 [inline]
   kill_fasync fs/fcntl.c:1151 [inline]
   kill_fasync+0x21a/0x520 fs/fcntl.c:1144
   sock_wake_async+0x132/0x160 net/socket.c:1480
   sk_wake_async_rcu include/net/sock.h:2452 [inline]
   sk_wake_async_rcu include/net/sock.h:2449 [inline]
   sock_def_readable+0x520/0x610 net/core/sock.c:3444
   tcp_urg net/ipv4/tcp_input.c:5920 [inline]
   tcp_urg+0x659/0xb80 net/ipv4/tcp_input.c:5900
   tcp_rcv_established+0x8a6/0x21c0 net/ipv4/tcp_input.c:6261
   tcp_v6_do_rcv+0x83c/0x16e0 net/ipv6/tcp_ipv6.c:1641
   sk_backlog_rcv include/net/sock.h:1115 [inline]
   __release_sock+0x14c/0x400 net/core/sock.c:3072
   release_sock+0x5a/0x220 net/core/sock.c:3626
   tcp_sendmsg+0x38/0x50 net/ipv4/tcp.c:1358
   inet6_sendmsg+0xb9/0x140 net/ipv6/af_inet6.c:661
   sock_sendmsg_nosec net/socket.c:729 [inline]
   __sock_sendmsg net/socket.c:744 [inline]
   __sys_sendto+0x36b/0x4d0 net/socket.c:2214
   __do_sys_sendto net/socket.c:2226 [inline]
   __se_sys_sendto net/socket.c:2222 [inline]
   __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2222
   do_syscall_x64 arch/x86/entry/common.c:52 [inline]
   do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
   entry_SYSCALL_64_after_hwframe+0x77/0x7f


stack backtrace:
CPU: 0 UID: 0 PID: 17111 Comm: syz.1.2386 Not tainted 6.12.0-rc5-syzkaller-00308-g3e5e6c9900c3 #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+0x116/0x1f0 lib/dump_stack.c:120
 print_bad_irq_dependency kernel/locking/lockdep.c:2647 [inline]
 check_irq_usage+0xf22/0x1290 kernel/locking/lockdep.c:2888
 check_prev_add kernel/locking/lockdep.c:3165 [inline]
 check_prevs_add kernel/locking/lockdep.c:3280 [inline]
 validate_chain kernel/locking/lockdep.c:3904 [inline]
 __lock_acquire+0x2521/0x3ce0 kernel/locking/lockdep.c:5202
 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825
 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
 _raw_read_lock_irqsave+0x74/0x90 kernel/locking/spinlock.c:236
 send_sigio+0x31/0x3e0 fs/fcntl.c:910
 kill_fasync_rcu fs/fcntl.c:1136 [inline]
 kill_fasync fs/fcntl.c:1151 [inline]
 kill_fasync+0x21a/0x520 fs/fcntl.c:1144
 sock_wake_async+0x132/0x160 net/socket.c:1480
 sk_wake_async_rcu include/net/sock.h:2452 [inline]
 sk_wake_async_rcu include/net/sock.h:2449 [inline]
 sock_def_readable+0x520/0x610 net/core/sock.c:3444
 tcp_urg net/ipv4/tcp_input.c:5920 [inline]
 tcp_urg+0x659/0xb80 net/ipv4/tcp_input.c:5900
 tcp_rcv_established+0x8a6/0x21c0 net/ipv4/tcp_input.c:6261
 tcp_v6_do_rcv+0x83c/0x16e0 net/ipv6/tcp_ipv6.c:1641
 sk_backlog_rcv include/net/sock.h:1115 [inline]
 __release_sock+0x14c/0x400 net/core/sock.c:3072
 release_sock+0x5a/0x220 net/core/sock.c:3626
 tcp_sendmsg+0x38/0x50 net/ipv4/tcp.c:1358
 inet6_sendmsg+0xb9/0x140 net/ipv6/af_inet6.c:661
 sock_sendmsg_nosec net/socket.c:729 [inline]
 __sock_sendmsg net/socket.c:744 [inline]
 __sys_sendto+0x36b/0x4d0 net/socket.c:2214
 __do_sys_sendto net/socket.c:2226 [inline]
 __se_sys_sendto net/socket.c:2222 [inline]
 __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2222
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe279f7e719
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:00007fe27acfd038 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007fe27a135f80 RCX: 00007fe279f7e719
RDX: 0000000000000001 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00007fe279ff132e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe27a135f80 R15: 00007fff15b245b8
 </TASK>

Crashes (219):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/03 10:21 upstream 3e5e6c9900c3 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in input_inject_event
2024/11/02 06:14 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in input_inject_event
2024/11/01 00:28 upstream 0fc810ae3ae1 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/31 04:40 upstream 4236f913808c fb888278 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/30 21:03 upstream 4236f913808c 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/10/30 12:17 upstream c1e939a21eb1 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/30 07:29 upstream c1e939a21eb1 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/24 11:41 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/24 05:28 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/24 01:46 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/23 12:53 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/22 12:25 upstream c2ee9f594da8 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/22 05:27 upstream c2ee9f594da8 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/20 22:24 upstream db87114dcf13 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/20 02:39 upstream 9197b73fd7bb cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/19 19:29 upstream 9197b73fd7bb cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/19 07:48 upstream 3d5ad2d4eca3 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/18 20:17 upstream 4d939780b705 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/10/18 12:09 upstream 4d939780b705 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/10/18 05:20 upstream 6efbea77b390 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/17 15:51 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/17 11:39 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/17 07:40 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/16 23:50 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/10/16 20:09 upstream 2f87d0916ce0 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/10/16 03:41 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/15 22:25 upstream 2f87d0916ce0 14943bb8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/15 18:48 upstream eca631b8fe80 14943bb8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/14 21:13 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/14 06:22 upstream ba01565ced22 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/14 02:58 upstream ba01565ced22 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/13 21:21 upstream cfea70e835b9 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in input_inject_event
2024/10/13 18:40 upstream ba01565ced22 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/13 16:35 upstream 36c254515dc6 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/13 14:22 upstream 36c254515dc6 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/12 23:48 upstream 09f6b0c8904b 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/12 17:06 upstream 09f6b0c8904b 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/12 15:42 upstream 09f6b0c8904b 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/10 19:16 upstream eb952c47d154 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in input_inject_event
2024/10/10 12:26 upstream d3d1556696c1 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/09 23:13 upstream b983b271662b 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/09 18:51 upstream 75b607fab38d 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/09 18:50 upstream 75b607fab38d 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in input_inject_event
2024/10/09 16:51 upstream 75b607fab38d 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/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/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/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/20 16:38 upstream 715ca9dd687f cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/19 16:46 upstream 3d5ad2d4eca3 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/19 03:03 upstream 4d939780b705 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/18 09:28 upstream 4d939780b705 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/11 04:41 upstream 1d227fcc7222 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/10 14:25 upstream d3d1556696c1 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/10 10:53 upstream b983b271662b 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in input_inject_event
2024/10/15 21:16 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in input_inject_event
2024/10/09 14:32 upstream 75b607fab38d 56fb2cb7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in input_inject_event
2024/10/08 16:41 upstream 87d6aab2389e 402f1df0 .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.