syzbot


possible deadlock in input_event

Status: upstream: reported C repro on 2023/06/23 12:11
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+0804476ed7b48fa80ca2@syzkaller.appspotmail.com
First crash: 799d, last: 1d08h
Fix commit to backport (bisect log) :
tree: upstream
commit c472d33bcbf7a1ed3710efe93822b5e94eabe18c
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Thu Aug 29 15:38:54 2024 +0000

  Input: cypress_ps2 - fix waiting for command response

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: possible deadlock in input_event (log)
Repro: C syz .config
  
Bug presence (3)
Date Name Commit Repro Result
2024/09/17 linux-6.1.y (ToT) 5f55cad62cc9 C [report] possible deadlock in input_event
2023/08/17 upstream (ToT) 4853c74bd7ab C [report] possible deadlock in input_event
2024/09/17 upstream (ToT) a940d9a43e62 C Didn't crash
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in input_event (2) fs 4 C inconclusive 6229 4h52m 1389d 0/29 upstream: reported C repro on 2021/11/10 17:01
upstream possible deadlock in input_event 4 C done 2740 1390d 1694d 0/29 closed as dup on 2021/07/07 07:31
linux-6.6 possible deadlock in input_event 4 25 2d10h 61d 0/2 upstream: reported on 2025/06/30 21:29
linux-5.15 possible deadlock in input_event missing-backport origin:upstream 4 C 424 1d06h 775d 0/3 upstream: reported C repro on 2023/07/17 14:44
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/10/07 15:07 6h39m fix candidate upstream OK (1) job log
2024/03/11 11:48 1h02m bisect fix linux-6.1.y OK (0) job log log
2023/12/23 12:11 1h02m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
=====================================================
WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
6.1.148-syzkaller #0 Not tainted
-----------------------------------------------------
syz.0.17/4437 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
ffff88807d83cb30 (&f->f_owner.lock){....}-{2:2}, at: send_sigio+0x2f/0x360 fs/fcntl.c:770

and this task is already holding:
ffff88802e9ca018 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:988 [inline]
ffff88802e9ca018 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x18e/0x4b0 fs/fcntl.c:1009
which would create a new lock dependency:
 (&new->fa_lock){....}-{2:2} -> (&f->f_owner.lock){....}-{2:2}

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

... which became HARDIRQ-irq-safe at:
  lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
  __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
  _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
  input_event+0x76/0xb0 drivers/input/input.c:430
  input_report_key include/linux/input.h:425 [inline]
  psmouse_report_standard_buttons drivers/input/mouse/psmouse-base.c:121 [inline]
  psmouse_report_standard_packet+0x4f/0x200 drivers/input/mouse/psmouse-base.c:139
  psmouse_process_byte+0x42b/0x620 drivers/input/mouse/psmouse-base.c:230
  psmouse_handle_byte+0x43/0x490 drivers/input/mouse/psmouse-base.c:272
  psmouse_interrupt+0x699/0x1130 drivers/input/mouse/psmouse-base.c:424
  serio_interrupt+0x87/0x130 drivers/input/serio/serio.c:998
  i8042_interrupt+0x36b/0x720 drivers/input/serio/i8042.c:610
  __handle_irq_event_percpu+0x298/0xa30 kernel/irq/handle.c:158
  handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
  handle_irq_event+0x87/0x1e0 kernel/irq/handle.c:210
  handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819
  generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
  handle_irq arch/x86/kernel/irq.c:233 [inline]
  __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252
  common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242
  asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682
  __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
  _raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194
  spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
  i8042_command drivers/input/serio/i8042.c:360 [inline]
  i8042_aux_write+0x105/0x170 drivers/input/serio/i8042.c:395
  serio_write include/linux/serio.h:125 [inline]
  ps2_do_sendbyte+0x1fb/0x6c0 drivers/input/serio/libps2.c:41
  ps2_sendbyte+0x5b/0x110 drivers/input/serio/libps2.c:93
  cypress_ps2_sendbyte drivers/input/mouse/cypress_ps2.c:42 [inline]
  cypress_ps2_read_cmd_status drivers/input/mouse/cypress_ps2.c:116 [inline]
  cypress_send_ext_cmd+0x239/0x910 drivers/input/mouse/cypress_ps2.c:189
  cypress_detect+0x89/0x190 drivers/input/mouse/cypress_ps2.c:205
  psmouse_do_detect drivers/input/mouse/psmouse-base.c:1007 [inline]
  psmouse_try_protocol drivers/input/mouse/psmouse-base.c:1021 [inline]
  psmouse_extensions+0xda5/0x1510 drivers/input/mouse/psmouse-base.c:1144
  psmouse_switch_protocol+0x300/0x820 drivers/input/mouse/psmouse-base.c:1538
  psmouse_connect+0x8d3/0x1490 drivers/input/mouse/psmouse-base.c:1628
  serio_connect_driver drivers/input/serio/serio.c:44 [inline]
  serio_driver_probe+0x76/0x90 drivers/input/serio/serio.c:775
  call_driver_probe drivers/base/dd.c:-1 [inline]
  really_probe+0x2aa/0xc70 drivers/base/dd.c:639
  __driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
  driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
  __driver_attach+0x44a/0x6e0 drivers/base/dd.c:1201
  bus_for_each_dev+0x175/0x1e0 drivers/base/bus.c:303
  serio_attach_driver drivers/input/serio/serio.c:804 [inline]
  serio_handle_event+0x29c/0x840 drivers/input/serio/serio.c:224
  process_one_work+0x898/0x1160 kernel/workqueue.c:2292
  worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
  kthread+0x29d/0x330 kernel/kthread.c:376
  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

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

... which became HARDIRQ-irq-unsafe at:
...
  lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
  __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
  _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
  do_wait+0x2b6/0xb60 kernel/exit.c:1605
  kernel_wait+0xa8/0x160 kernel/exit.c:1795
  call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
  call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
  process_one_work+0x898/0x1160 kernel/workqueue.c:2292
  worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
  kthread+0x29d/0x330 kernel/kthread.c:376
  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

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 ***

8 locks held by syz.0.17/4437:
 #0: ffff88802978a110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_write+0x177/0x470 drivers/input/evdev.c:513
 #1: ffff88801d720230 (&dev->event_lock#2){-...}-{2:2}, at: input_inject_event+0xa7/0x310 drivers/input/input.c:456
 #2: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #2: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #2: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: input_inject_event+0xb8/0x310 drivers/input/input.c:458
 #3: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #3: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #3: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: input_pass_values+0xa3/0x1300 drivers/input/input.c:151
 #4: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #4: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #4: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: evdev_events+0x75/0x320 drivers/input/evdev.c:298
 #5: ffff8880765d8028 (&client->buffer_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #5: ffff8880765d8028 (&client->buffer_lock){....}-{2:2}, at: evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
 #6: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #6: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #6: ffffffff8cb2ade0 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x4f/0x4b0 fs/fcntl.c:1008
 #7: ffff88802e9ca018 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:988 [inline]
 #7: ffff88802e9ca018 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0x18e/0x4b0 fs/fcntl.c:1009

the dependencies between HARDIRQ-irq-safe lock and the holding lock:
  -> (&dev->event_lock#2){-...}-{2:2} {
     IN-HARDIRQ-W at:
                        lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                        __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                        _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
                        input_event+0x76/0xb0 drivers/input/input.c:430
                        input_report_key include/linux/input.h:425 [inline]
                        psmouse_report_standard_buttons drivers/input/mouse/psmouse-base.c:121 [inline]
                        psmouse_report_standard_packet+0x4f/0x200 drivers/input/mouse/psmouse-base.c:139
                        psmouse_process_byte+0x42b/0x620 drivers/input/mouse/psmouse-base.c:230
                        psmouse_handle_byte+0x43/0x490 drivers/input/mouse/psmouse-base.c:272
                        psmouse_interrupt+0x699/0x1130 drivers/input/mouse/psmouse-base.c:424
                        serio_interrupt+0x87/0x130 drivers/input/serio/serio.c:998
                        i8042_interrupt+0x36b/0x720 drivers/input/serio/i8042.c:610
                        __handle_irq_event_percpu+0x298/0xa30 kernel/irq/handle.c:158
                        handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
                        handle_irq_event+0x87/0x1e0 kernel/irq/handle.c:210
                        handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819
                        generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
                        handle_irq arch/x86/kernel/irq.c:233 [inline]
                        __common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252
                        common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242
                        asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:682
                        __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
                        _raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194
                        spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
                        i8042_command drivers/input/serio/i8042.c:360 [inline]
                        i8042_aux_write+0x105/0x170 drivers/input/serio/i8042.c:395
                        serio_write include/linux/serio.h:125 [inline]
                        ps2_do_sendbyte+0x1fb/0x6c0 drivers/input/serio/libps2.c:41
                        ps2_sendbyte+0x5b/0x110 drivers/input/serio/libps2.c:93
                        cypress_ps2_sendbyte drivers/input/mouse/cypress_ps2.c:42 [inline]
                        cypress_ps2_read_cmd_status drivers/input/mouse/cypress_ps2.c:116 [inline]
                        cypress_send_ext_cmd+0x239/0x910 drivers/input/mouse/cypress_ps2.c:189
                        cypress_detect+0x89/0x190 drivers/input/mouse/cypress_ps2.c:205
                        psmouse_do_detect drivers/input/mouse/psmouse-base.c:1007 [inline]
                        psmouse_try_protocol drivers/input/mouse/psmouse-base.c:1021 [inline]
                        psmouse_extensions+0xda5/0x1510 drivers/input/mouse/psmouse-base.c:1144
                        psmouse_switch_protocol+0x300/0x820 drivers/input/mouse/psmouse-base.c:1538
                        psmouse_connect+0x8d3/0x1490 drivers/input/mouse/psmouse-base.c:1628
                        serio_connect_driver drivers/input/serio/serio.c:44 [inline]
                        serio_driver_probe+0x76/0x90 drivers/input/serio/serio.c:775
                        call_driver_probe drivers/base/dd.c:-1 [inline]
                        really_probe+0x2aa/0xc70 drivers/base/dd.c:639
                        __driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
                        driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
                        __driver_attach+0x44a/0x6e0 drivers/base/dd.c:1201
                        bus_for_each_dev+0x175/0x1e0 drivers/base/bus.c:303
                        serio_attach_driver drivers/input/serio/serio.c:804 [inline]
                        serio_handle_event+0x29c/0x840 drivers/input/serio/serio.c:224
                        process_one_work+0x898/0x1160 kernel/workqueue.c:2292
                        worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
                        kthread+0x29d/0x330 kernel/kthread.c:376
                        ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
     INITIAL USE at:
                       lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                       __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
                       _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
                       input_inject_event+0xa7/0x310 drivers/input/input.c:456
                       led_trigger_event+0x12f/0x210 drivers/leds/led-triggers.c:392
                       kbd_led_trigger_activate+0xb9/0x100 drivers/tty/vt/keyboard.c:1036
                       led_trigger_set+0x504/0x900 drivers/leds/led-triggers.c:211
                       led_trigger_set_default+0x19c/0x1e0 drivers/leds/led-triggers.c:275
                       led_classdev_register_ext+0x5d3/0x7a0 drivers/leds/led-class.c:426
                       led_classdev_register include/linux/leds.h:196 [inline]
                       input_leds_connect+0x4e7/0x6b0 drivers/input/input-leds.c:139
                       input_attach_handler drivers/input/input.c:1060 [inline]
                       input_register_device+0xdfd/0x1310 drivers/input/input.c:2470
                       atkbd_connect+0x6e9/0x980 drivers/input/keyboard/atkbd.c:1322
                       serio_connect_driver drivers/input/serio/serio.c:44 [inline]
                       serio_driver_probe+0x76/0x90 drivers/input/serio/serio.c:775
                       call_driver_probe drivers/base/dd.c:-1 [inline]
                       really_probe+0x2aa/0xc70 drivers/base/dd.c:639
                       __driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
                       driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
                       __driver_attach+0x44a/0x6e0 drivers/base/dd.c:1201
                       bus_for_each_dev+0x175/0x1e0 drivers/base/bus.c:303
                       serio_attach_driver drivers/input/serio/serio.c:804 [inline]
                       serio_handle_event+0x29c/0x840 drivers/input/serio/serio.c:224
                       process_one_work+0x898/0x1160 kernel/workqueue.c:2292
                       worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
                       kthread+0x29d/0x330 kernel/kthread.c:376
                       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
   }
   ... key      at: [<ffffffff96fa75a0>] input_allocate_device.__key.5+0x0/0x20
 -> (&client->buffer_lock){....}-{2:2} {
    INITIAL USE at:
                     lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                     __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
                     _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
                     spin_lock include/linux/spinlock.h:351 [inline]
                     evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
                     evdev_events+0x1d4/0x320 drivers/input/evdev.c:306
                     input_to_handler drivers/input/input.c:127 [inline]
                     input_pass_values+0x907/0x1300 drivers/input/input.c:159
                     input_event_dispose+0x346/0x6c0 drivers/input/input.c:374
                     input_inject_event+0x1f5/0x310 drivers/input/input.c:461
                     evdev_write+0x326/0x470 drivers/input/evdev.c:530
                     vfs_write+0x2c4/0x960 fs/read_write.c:582
                     ksys_write+0x143/0x240 fs/read_write.c:637
                     do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                     do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
                     entry_SYSCALL_64_after_hwframe+0x68/0xd2
  }
  ... key      at: [<ffffffff96fa7860>] evdev_open.__key.29+0x0/0x20
  ... acquired at:
   __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
   _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
   spin_lock include/linux/spinlock.h:351 [inline]
   evdev_pass_values+0xcb/0xab0 drivers/input/evdev.c:261
   evdev_events+0x1d4/0x320 drivers/input/evdev.c:306
   input_to_handler drivers/input/input.c:127 [inline]
   input_pass_values+0x907/0x1300 drivers/input/input.c:159
   input_event_dispose+0x346/0x6c0 drivers/input/input.c:374
   input_inject_event+0x1f5/0x310 drivers/input/input.c:461
   evdev_write+0x326/0x470 drivers/input/evdev.c:530
   vfs_write+0x2c4/0x960 fs/read_write.c:582
   ksys_write+0x143/0x240 fs/read_write.c:637
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> (&new->fa_lock){....}-{2:2} {
   INITIAL READ USE at:
                        lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
                        kill_fasync_rcu fs/fcntl.c:988 [inline]
                        kill_fasync+0x18e/0x4b0 fs/fcntl.c:1009
                        __pass_event drivers/input/evdev.c:240 [inline]
                        evdev_pass_values+0x54b/0xab0 drivers/input/evdev.c:278
                        evdev_events+0x1d4/0x320 drivers/input/evdev.c:306
                        input_to_handler drivers/input/input.c:127 [inline]
                        input_pass_values+0x907/0x1300 drivers/input/input.c:159
                        input_event_dispose+0x346/0x6c0 drivers/input/input.c:374
                        input_inject_event+0x1f5/0x310 drivers/input/input.c:461
                        evdev_write+0x326/0x470 drivers/input/evdev.c:530
                        vfs_write+0x2c4/0x960 fs/read_write.c:582
                        ksys_write+0x143/0x240 fs/read_write.c:637
                        do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                        do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
                        entry_SYSCALL_64_after_hwframe+0x68/0xd2
 }
 ... key      at: [<ffffffff96caf560>] fasync_insert_entry.__key+0x0/0x20
 ... acquired at:
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
   kill_fasync_rcu fs/fcntl.c:988 [inline]
   kill_fasync+0x18e/0x4b0 fs/fcntl.c:1009
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values+0x54b/0xab0 drivers/input/evdev.c:278
   evdev_events+0x1d4/0x320 drivers/input/evdev.c:306
   input_to_handler drivers/input/input.c:127 [inline]
   input_pass_values+0x907/0x1300 drivers/input/input.c:159
   input_event_dispose+0x346/0x6c0 drivers/input/input.c:374
   input_inject_event+0x1f5/0x310 drivers/input/input.c:461
   evdev_write+0x326/0x470 drivers/input/evdev.c:530
   vfs_write+0x2c4/0x960 fs/read_write.c:582
   ksys_write+0x143/0x240 fs/read_write.c:637
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2


the dependencies between the lock to be acquired
 and HARDIRQ-irq-unsafe lock:
 -> (tasklist_lock){.+.+}-{2:2} {
    HARDIRQ-ON-R at:
                      lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                      __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                      _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                      do_wait+0x2b6/0xb60 kernel/exit.c:1605
                      kernel_wait+0xa8/0x160 kernel/exit.c:1795
                      call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
                      call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
                      process_one_work+0x898/0x1160 kernel/workqueue.c:2292
                      worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
                      kthread+0x29d/0x330 kernel/kthread.c:376
                      ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
    SOFTIRQ-ON-R at:
                      lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                      __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                      _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                      do_wait+0x2b6/0xb60 kernel/exit.c:1605
                      kernel_wait+0xa8/0x160 kernel/exit.c:1795
                      call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
                      call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
                      process_one_work+0x898/0x1160 kernel/workqueue.c:2292
                      worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
                      kthread+0x29d/0x330 kernel/kthread.c:376
                      ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
    INITIAL USE at:
                     lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                     __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                     _raw_write_lock_irq+0x9f/0xe0 kernel/locking/spinlock.c:326
                     copy_process+0x2531/0x4020 kernel/fork.c:2476
                     kernel_clone+0x225/0x8b0 kernel/fork.c:2757
                     user_mode_thread+0xda/0x130 kernel/fork.c:2833
                     rest_init+0x23/0x300 init/main.c:698
                     start_kernel+0x0/0x539 init/main.c:893
                     start_kernel+0x490/0x539 init/main.c:1140
                     secondary_startup_64_no_verify+0xcf/0xdb
    INITIAL READ USE at:
                          lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                          __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
                          _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
                          do_wait+0x2b6/0xb60 kernel/exit.c:1605
                          kernel_wait+0xa8/0x160 kernel/exit.c:1795
                          call_usermodehelper_exec_sync kernel/umh.c:140 [inline]
                          call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167
                          process_one_work+0x898/0x1160 kernel/workqueue.c:2292
                          worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
                          kthread+0x29d/0x330 kernel/kthread.c:376
                          ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
  }
  ... key      at: [<ffffffff8c80a058>] tasklist_lock+0x18/0x40
  ... acquired at:
   __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline]
   _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
   send_sigurg+0xec/0x3c0 fs/fcntl.c:825
   sk_send_sigurg+0x6b/0xc0 net/core/sock.c:3366
   tcp_check_urg+0x200/0x750 net/ipv4/tcp_input.c:5716
   tcp_urg+0x15d/0x3e0 net/ipv4/tcp_input.c:5757
   tcp_rcv_established+0xde4/0x1d30 net/ipv4/tcp_input.c:6110
   tcp_v6_do_rcv+0x588/0x1320 net/ipv6/tcp_ipv6.c:1487
   sk_backlog_rcv include/net/sock.h:1119 [inline]
   __release_sock+0x1b9/0x420 net/core/sock.c:2939
   release_sock+0x5b/0x1b0 net/core/sock.c:3503
   sk_stream_wait_memory+0x6ed/0xec0 net/core/stream.c:145
   tcp_sendmsg_locked+0x15b6/0x3f10 net/ipv4/tcp.c:1452
   tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1490
   sock_sendmsg_nosec net/socket.c:718 [inline]
   __sock_sendmsg net/socket.c:730 [inline]
   __sys_sendto+0x44f/0x5c0 net/socket.c:2153
   __do_sys_sendto net/socket.c:2165 [inline]
   __se_sys_sendto net/socket.c:2161 [inline]
   __x64_sys_sendto+0xda/0xf0 net/socket.c:2161
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> (&f->f_owner.lock){....}-{2:2} {
   INITIAL USE at:
                   lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                   __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline]
                   _raw_write_lock_irq+0x9f/0xe0 kernel/locking/spinlock.c:326
                   __f_setown+0x37/0x330 fs/fcntl.c:91
                   f_setown+0x147/0x200 fs/fcntl.c:132
                   do_fcntl+0x215/0x11c0 fs/fcntl.c:369
                   __do_sys_fcntl fs/fcntl.c:446 [inline]
                   __se_sys_fcntl+0xc9/0x190 fs/fcntl.c:431
                   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
                   entry_SYSCALL_64_after_hwframe+0x68/0xd2
   INITIAL READ USE at:
                        lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
                        __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
                        _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
                        send_sigurg+0x25/0x3c0 fs/fcntl.c:809
                        sk_send_sigurg+0x6b/0xc0 net/core/sock.c:3366
                        tcp_check_urg+0x200/0x750 net/ipv4/tcp_input.c:5716
                        tcp_urg+0x15d/0x3e0 net/ipv4/tcp_input.c:5757
                        tcp_rcv_established+0xde4/0x1d30 net/ipv4/tcp_input.c:6110
                        tcp_v6_do_rcv+0x588/0x1320 net/ipv6/tcp_ipv6.c:1487
                        sk_backlog_rcv include/net/sock.h:1119 [inline]
                        __release_sock+0x1b9/0x420 net/core/sock.c:2939
                        release_sock+0x5b/0x1b0 net/core/sock.c:3503
                        sk_stream_wait_memory+0x6ed/0xec0 net/core/stream.c:145
                        tcp_sendmsg_locked+0x15b6/0x3f10 net/ipv4/tcp.c:1452
                        tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1490
                        sock_sendmsg_nosec net/socket.c:718 [inline]
                        __sock_sendmsg net/socket.c:730 [inline]
                        __sys_sendto+0x44f/0x5c0 net/socket.c:2153
                        __do_sys_sendto net/socket.c:2165 [inline]
                        __se_sys_sendto net/socket.c:2161 [inline]
                        __x64_sys_sendto+0xda/0xf0 net/socket.c:2161
                        do_syscall_x64 arch/x86/entry/common.c:51 [inline]
                        do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
                        entry_SYSCALL_64_after_hwframe+0x68/0xd2
 }
 ... key      at: [<ffffffff96cae8e0>] __alloc_file.__key+0x0/0x10
 ... acquired at:
   __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
   _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
   send_sigio+0x2f/0x360 fs/fcntl.c:770
   kill_fasync_rcu fs/fcntl.c:995 [inline]
   kill_fasync+0x224/0x4b0 fs/fcntl.c:1009
   __pass_event drivers/input/evdev.c:240 [inline]
   evdev_pass_values+0x54b/0xab0 drivers/input/evdev.c:278
   evdev_events+0x1d4/0x320 drivers/input/evdev.c:306
   input_to_handler drivers/input/input.c:127 [inline]
   input_pass_values+0x907/0x1300 drivers/input/input.c:159
   input_event_dispose+0x346/0x6c0 drivers/input/input.c:374
   input_inject_event+0x1f5/0x310 drivers/input/input.c:461
   evdev_write+0x326/0x470 drivers/input/evdev.c:530
   vfs_write+0x2c4/0x960 fs/read_write.c:582
   ksys_write+0x143/0x240 fs/read_write.c:637
   do_syscall_x64 arch/x86/entry/common.c:51 [inline]
   do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
   entry_SYSCALL_64_after_hwframe+0x68/0xd2


stack backtrace:
CPU: 0 PID: 4437 Comm: syz.0.17 Not tainted 6.1.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 print_bad_irq_dependency kernel/locking/lockdep.c:2604 [inline]
 check_irq_usage kernel/locking/lockdep.c:2843 [inline]
 check_prev_add kernel/locking/lockdep.c:3094 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain kernel/locking/lockdep.c:3825 [inline]
 __lock_acquire+0x660b/0x7c50 kernel/locking/lockdep.c:5049
 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
 _raw_read_lock_irqsave+0xac/0xf0 kernel/locking/spinlock.c:236
 send_sigio+0x2f/0x360 fs/fcntl.c:770
 kill_fasync_rcu fs/fcntl.c:995 [inline]
 kill_fasync+0x224/0x4b0 fs/fcntl.c:1009
 __pass_event drivers/input/evdev.c:240 [inline]
 evdev_pass_values+0x54b/0xab0 drivers/input/evdev.c:278
 evdev_events+0x1d4/0x320 drivers/input/evdev.c:306
 input_to_handler drivers/input/input.c:127 [inline]
 input_pass_values+0x907/0x1300 drivers/input/input.c:159
 input_event_dispose+0x346/0x6c0 drivers/input/input.c:374
 input_inject_event+0x1f5/0x310 drivers/input/input.c:461
 evdev_write+0x326/0x470 drivers/input/evdev.c:530
 vfs_write+0x2c4/0x960 fs/read_write.c:582
 ksys_write+0x143/0x240 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f915f18ebe9
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:00007f916008c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f915f3b6090 RCX: 00007f915f18ebe9
RDX: 0000000000002ad8 RSI: 0000200000000040 RDI: 0000000000000004
RBP: 00007f915f211e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f915f3b6128 R14: 00007f915f3b6090 R15: 00007ffc4a938968
 </TASK>

Crashes (430):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/26 11:52 linux-6.1.y 0bc96de781b4 bf27483f .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2024/01/20 22:35 linux-6.1.y 8fd7f4462453 9bd8dcda .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2023/09/13 01:41 linux-6.1.y 59b13c2b647e 59da8366 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2023/08/17 13:21 linux-6.1.y 6c44e13dc284 74b106b6 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/30 02:08 linux-6.1.y f89b6e15694c 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/28 19:25 linux-6.1.y f89b6e15694c e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/26 08:10 linux-6.1.y 0bc96de781b4 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/21 17:48 linux-6.1.y 0bc96de781b4 3e79b825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/20 19:16 linux-6.1.y 0bc96de781b4 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/20 19:16 linux-6.1.y 0bc96de781b4 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/20 05:58 linux-6.1.y 0bc96de781b4 79512909 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/19 17:47 linux-6.1.y 0bc96de781b4 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/12 21:44 linux-6.1.y 3594f306da12 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/08 05:28 linux-6.1.y 3594f306da12 6a893178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/08/07 14:31 linux-6.1.y 3594f306da12 04cffc22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/31 19:47 linux-6.1.y 3594f306da12 0c075d67 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/29 23:55 linux-6.1.y 3594f306da12 f8f2b4da .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/28 18:27 linux-6.1.y 3594f306da12 6654ea9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/24 14:12 linux-6.1.y 3594f306da12 65d60d73 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/24 01:37 linux-6.1.y 3369c6df2fae 0c1d6ded .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/23 06:59 linux-6.1.y 3369c6df2fae e1dd4f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/22 03:47 linux-6.1.y 3369c6df2fae 1555463b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/21 15:02 linux-6.1.y 3369c6df2fae 56d87229 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/15 12:38 linux-6.1.y f2198ea7eb3e 03fcfc4b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/10 06:08 linux-6.1.y 04d1ccaa9c28 956bd956 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/08 18:37 linux-6.1.y 04d1ccaa9c28 4d9fdfa4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/06 13:52 linux-6.1.y 04d1ccaa9c28 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/07/05 10:26 linux-6.1.y 7e69c33e4858 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/30 21:54 linux-6.1.y 7e69c33e4858 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/28 02:42 linux-6.1.y 7e69c33e4858 fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/27 16:46 linux-6.1.y 7e69c33e4858 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/27 16:45 linux-6.1.y 7e69c33e4858 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/12 23:25 linux-6.1.y 58485ff1a74f 98683f8f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/06 15:51 linux-6.1.y 58485ff1a74f 9fa58bba .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/06/06 11:44 linux-6.1.y 58485ff1a74f 9fa58bba .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/23 18:24 linux-6.1.y da3c5173c55f f8cc0c83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/23 03:22 linux-6.1.y da3c5173c55f fa44301a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/22 17:01 linux-6.1.y da3c5173c55f 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/22 05:00 linux-6.1.y 325285d9fc86 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/20 15:20 linux-6.1.y 325285d9fc86 b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/07 22:30 linux-6.1.y ac7079a42ea5 dbf35fa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/05 20:07 linux-6.1.y ac7079a42ea5 6ca47dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/05/01 16:30 linux-6.1.y 535ec20c5027 51b137cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/28 23:20 linux-6.1.y 535ec20c5027 aeb6ec69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/23 21:47 linux-6.1.y 420102835862 73a168d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/17 13:33 linux-6.1.y 420102835862 229db4cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/15 14:37 linux-6.1.y 420102835862 23b969b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/11 08:20 linux-6.1.y 420102835862 94486846 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/04 13:13 linux-6.1.y 8e60a714ba3b 1c4febdb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2025/04/02 09:11 linux-6.1.y 8e60a714ba3b c799dfdd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in input_event
2023/06/23 12:10 linux-6.1.y e84a4e368abe 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in input_event
* Struck through repros no longer work on HEAD.