ci starts bisection 2023-04-02 08:31:34.783045275 +0000 UTC m=+331635.229393260 bisecting fixing commit since 9f266ccaa2f5228bfe67ad58a94ca4e0109b954a building syzkaller on 16d19e303f62f2869ec49e78618e6fc7f2c9ce61 ensuring issue is reproducible on original commit 9f266ccaa2f5228bfe67ad58a94ca4e0109b954a testing commit 9f266ccaa2f5228bfe67ad58a94ca4e0109b954a gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 5936033fe949404c59964127788436e004680f819263356ddf9047cb4bc3f7c0 all runs: crashed: possible deadlock in input_event testing current HEAD 00c7b5f4ddc5b346df62b757ec73f9357bb452af testing commit 00c7b5f4ddc5b346df62b757ec73f9357bb452af gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 8919da0b10f531345c39d14bdf95838e950c3428185343b4f15229968d3a0cb3 all runs: crashed: possible deadlock in input_event revisions tested: 2, total time: 34m14.286473336s (build: 25m18.180706777s, test: 7m47.823714597s) the crash still happens on HEAD commit msg: Merge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input crash: possible deadlock in input_event ===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.3.0-rc4-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.0/5601 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffff888073e5e018 (&new->fa_lock){....}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:997 [inline] ffff888073e5e018 (&new->fa_lock){....}-{2:2}, at: kill_fasync fs/fcntl.c:1018 [inline] ffff888073e5e018 (&new->fa_lock){....}-{2:2}, at: kill_fasync+0xe9/0x370 fs/fcntl.c:1011 and this task is already holding: ffff888076404028 (&client->buffer_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] ffff888076404028 (&client->buffer_lock){....}-{2:2}, at: evdev_pass_values.part.0+0xef/0xb10 drivers/input/evdev.c:261 which would create a new lock dependency: (&client->buffer_lock){....}-{2:2} -> (&new->fa_lock){....}-{2:2} but this new dependency connects a HARDIRQ-irq-safe lock: (&dev->event_lock#2){-...}-{2:2} ... which became HARDIRQ-irq-safe at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 input_event drivers/input/input.c:432 [inline] input_event+0x46/0x80 drivers/input/input.c:425 input_report_key include/linux/input.h:425 [inline] psmouse_report_standard_buttons+0x1f/0x60 drivers/input/mouse/psmouse-base.c:121 psmouse_report_standard_packet drivers/input/mouse/psmouse-base.c:139 [inline] psmouse_process_byte+0x33e/0x7c0 drivers/input/mouse/psmouse-base.c:230 psmouse_handle_byte+0x3a/0x500 drivers/input/mouse/psmouse-base.c:272 psmouse_interrupt+0x22f/0x11c0 drivers/input/mouse/psmouse-base.c:424 serio_interrupt+0x82/0x110 drivers/input/serio/serio.c:998 i8042_interrupt+0x267/0x780 drivers/input/serio/i8042.c:606 __handle_irq_event_percpu+0x1b9/0x540 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xa5/0x1b0 kernel/irq/handle.c:210 handle_edge_irq+0x207/0xb50 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xa1/0x220 arch/x86/kernel/irq.c:250 common_interrupt+0xa8/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0x3c/0x70 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:405 [inline] i8042_command+0x8f/0xb0 drivers/input/serio/i8042.c:356 i8042_aux_write+0xb5/0x100 drivers/input/serio/i8042.c:391 serio_write include/linux/serio.h:125 [inline] ps2_do_sendbyte+0x220/0x600 drivers/input/serio/libps2.c:41 ps2_sendbyte+0x57/0x140 drivers/input/serio/libps2.c:93 cypress_ps2_sendbyte+0x21/0x120 drivers/input/mouse/cypress_ps2.c:42 cypress_ps2_read_cmd_status drivers/input/mouse/cypress_ps2.c:116 [inline] cypress_send_ext_cmd+0x1ae/0x7c0 drivers/input/mouse/cypress_ps2.c:189 cypress_detect+0x70/0x130 drivers/input/mouse/cypress_ps2.c:205 psmouse_do_detect drivers/input/mouse/psmouse-base.c:1007 [inline] psmouse_try_protocol+0x194/0x3a0 drivers/input/mouse/psmouse-base.c:1021 psmouse_extensions+0x3f8/0x680 drivers/input/mouse/psmouse-base.c:1144 psmouse_switch_protocol+0x4a2/0x690 drivers/input/mouse/psmouse-base.c:1538 psmouse_connect+0x58c/0xde0 drivers/input/mouse/psmouse-base.c:1628 serio_connect_driver drivers/input/serio/serio.c:44 [inline] serio_driver_probe+0x71/0xa0 drivers/input/serio/serio.c:775 call_driver_probe drivers/base/dd.c:552 [inline] really_probe+0x1c7/0xb20 drivers/base/dd.c:631 __driver_probe_device+0x186/0x460 drivers/base/dd.c:768 driver_probe_device+0x44/0x110 drivers/base/dd.c:798 __driver_attach+0x1d0/0x490 drivers/base/dd.c:1184 bus_for_each_dev+0xef/0x170 drivers/base/bus.c:368 serio_attach_driver drivers/input/serio/serio.c:804 [inline] serio_handle_event+0x23d/0x9b0 drivers/input/serio/serio.c:224 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 to a HARDIRQ-irq-unsafe lock: (tasklist_lock){.+.+}-{2:2} ... which became HARDIRQ-irq-unsafe at: ... lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228 do_wait+0x235/0xa20 kernel/exit.c:1602 kernel_wait+0x9b/0x130 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:137 [inline] call_usermodehelper_exec_work+0xbf/0x140 kernel/umh.c:164 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 other info that might help us debug this: Chain exists of: &dev->event_lock#2 --> &client->buffer_lock --> tasklist_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(tasklist_lock); local_irq_disable(); lock(&dev->event_lock#2); lock(&client->buffer_lock); lock(&dev->event_lock#2); *** DEADLOCK *** 7 locks held by syz-executor.0/5601: #0: ffff888020f5c110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_write+0x187/0x6c0 drivers/input/evdev.c:513 #1: ffff888144adb230 (&dev->event_lock#2){-...}-{2:2}, at: input_inject_event+0x7b/0x240 drivers/input/input.c:458 #2: ffffffff8b78ac80 (rcu_read_lock){....}-{1:2}, at: is_event_supported drivers/input/input.c:468 [inline] #2: ffffffff8b78ac80 (rcu_read_lock){....}-{1:2}, at: input_inject_event+0x6c/0x240 drivers/input/input.c:457 #3: ffffffff8b78ac80 (rcu_read_lock){....}-{1:2}, at: input_pass_values.part.0+0x0/0x580 drivers/input/input.c:898 #4: ffffffff8b78ac80 (rcu_read_lock){....}-{1:2}, at: evdev_events+0x54/0x310 drivers/input/evdev.c:296 #5: ffff888076404028 (&client->buffer_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #5: ffff888076404028 (&client->buffer_lock){....}-{2:2}, at: evdev_pass_values.part.0+0xef/0xb10 drivers/input/evdev.c:261 #6: ffffffff8b78ac80 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x3c/0x370 fs/fcntl.c:1016 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> (&dev->event_lock#2){-...}-{2:2} { IN-HARDIRQ-W at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 input_event drivers/input/input.c:432 [inline] input_event+0x46/0x80 drivers/input/input.c:425 input_report_key include/linux/input.h:425 [inline] psmouse_report_standard_buttons+0x1f/0x60 drivers/input/mouse/psmouse-base.c:121 psmouse_report_standard_packet drivers/input/mouse/psmouse-base.c:139 [inline] psmouse_process_byte+0x33e/0x7c0 drivers/input/mouse/psmouse-base.c:230 psmouse_handle_byte+0x3a/0x500 drivers/input/mouse/psmouse-base.c:272 psmouse_interrupt+0x22f/0x11c0 drivers/input/mouse/psmouse-base.c:424 serio_interrupt+0x82/0x110 drivers/input/serio/serio.c:998 i8042_interrupt+0x267/0x780 drivers/input/serio/i8042.c:606 __handle_irq_event_percpu+0x1b9/0x540 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xa5/0x1b0 kernel/irq/handle.c:210 handle_edge_irq+0x207/0xb50 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0xa1/0x220 arch/x86/kernel/irq.c:250 common_interrupt+0xa8/0xd0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0x3c/0x70 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:405 [inline] i8042_command+0x8f/0xb0 drivers/input/serio/i8042.c:356 i8042_aux_write+0xb5/0x100 drivers/input/serio/i8042.c:391 serio_write include/linux/serio.h:125 [inline] ps2_do_sendbyte+0x220/0x600 drivers/input/serio/libps2.c:41 ps2_sendbyte+0x57/0x140 drivers/input/serio/libps2.c:93 cypress_ps2_sendbyte+0x21/0x120 drivers/input/mouse/cypress_ps2.c:42 cypress_ps2_read_cmd_status drivers/input/mouse/cypress_ps2.c:116 [inline] cypress_send_ext_cmd+0x1ae/0x7c0 drivers/input/mouse/cypress_ps2.c:189 cypress_detect+0x70/0x130 drivers/input/mouse/cypress_ps2.c:205 psmouse_do_detect drivers/input/mouse/psmouse-base.c:1007 [inline] psmouse_try_protocol+0x194/0x3a0 drivers/input/mouse/psmouse-base.c:1021 psmouse_extensions+0x3f8/0x680 drivers/input/mouse/psmouse-base.c:1144 psmouse_switch_protocol+0x4a2/0x690 drivers/input/mouse/psmouse-base.c:1538 psmouse_connect+0x58c/0xde0 drivers/input/mouse/psmouse-base.c:1628 serio_connect_driver drivers/input/serio/serio.c:44 [inline] serio_driver_probe+0x71/0xa0 drivers/input/serio/serio.c:775 call_driver_probe drivers/base/dd.c:552 [inline] really_probe+0x1c7/0xb20 drivers/base/dd.c:631 __driver_probe_device+0x186/0x460 drivers/base/dd.c:768 driver_probe_device+0x44/0x110 drivers/base/dd.c:798 __driver_attach+0x1d0/0x490 drivers/base/dd.c:1184 bus_for_each_dev+0xef/0x170 drivers/base/bus.c:368 serio_attach_driver drivers/input/serio/serio.c:804 [inline] serio_handle_event+0x23d/0x9b0 drivers/input/serio/serio.c:224 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 input_inject_event+0x7b/0x240 drivers/input/input.c:458 led_trigger_event drivers/leds/led-triggers.c:390 [inline] led_trigger_event+0x8e/0x180 drivers/leds/led-triggers.c:380 kbd_led_trigger_activate+0xa5/0xe0 drivers/tty/vt/keyboard.c:1036 led_trigger_set+0x561/0xb20 drivers/leds/led-triggers.c:197 led_trigger_set_default drivers/leds/led-triggers.c:262 [inline] led_trigger_set_default+0x16b/0x200 drivers/leds/led-triggers.c:249 led_classdev_register_ext+0x4fa/0x750 drivers/leds/led-class.c:514 led_classdev_register include/linux/leds.h:217 [inline] input_leds_connect+0x3c6/0x810 drivers/input/input-leds.c:139 input_attach_handler+0x10b/0x1c0 drivers/input/input.c:1062 input_register_device+0x8a0/0xe30 drivers/input/input.c:2394 atkbd_connect+0x5d5/0x900 drivers/input/keyboard/atkbd.c:1278 serio_connect_driver drivers/input/serio/serio.c:44 [inline] serio_driver_probe+0x71/0xa0 drivers/input/serio/serio.c:775 call_driver_probe drivers/base/dd.c:552 [inline] really_probe+0x1c7/0xb20 drivers/base/dd.c:631 __driver_probe_device+0x186/0x460 drivers/base/dd.c:768 driver_probe_device+0x44/0x110 drivers/base/dd.c:798 __driver_attach+0x1d0/0x490 drivers/base/dd.c:1184 bus_for_each_dev+0xef/0x170 drivers/base/bus.c:368 serio_attach_driver drivers/input/serio/serio.c:804 [inline] serio_handle_event+0x23d/0x9b0 drivers/input/serio/serio.c:224 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 } ... key at: [] __key.7+0x0/0x40 -> (&client->buffer_lock){....}-{2:2} { INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __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:350 [inline] evdev_pass_values.part.0+0xef/0xb10 drivers/input/evdev.c:261 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x293/0x310 drivers/input/evdev.c:306 input_to_handler+0x23d/0x4a0 drivers/input/input.c:129 input_pass_values.part.0+0x1a3/0x580 drivers/input/input.c:161 input_pass_values drivers/input/input.c:148 [inline] input_event_dispose+0x4ef/0x6d0 drivers/input/input.c:376 input_inject_event+0x183/0x240 drivers/input/input.c:463 evdev_write+0x359/0x6c0 drivers/input/evdev.c:530 vfs_write+0x209/0xd80 fs/read_write.c:582 ksys_write+0x16f/0x1c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd } ... key at: [] __key.3+0x0/0x40 ... acquired at: __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:350 [inline] evdev_pass_values.part.0+0xef/0xb10 drivers/input/evdev.c:261 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x293/0x310 drivers/input/evdev.c:306 input_to_handler+0x23d/0x4a0 drivers/input/input.c:129 input_pass_values.part.0+0x1a3/0x580 drivers/input/input.c:161 input_pass_values drivers/input/input.c:148 [inline] input_event_dispose+0x4ef/0x6d0 drivers/input/input.c:376 input_inject_event+0x183/0x240 drivers/input/input.c:463 evdev_write+0x359/0x6c0 drivers/input/evdev.c:530 vfs_write+0x209/0xd80 fs/read_write.c:582 ksys_write+0x16f/0x1c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd the dependencies between the lock to be acquired and HARDIRQ-irq-unsafe lock: -> (tasklist_lock){.+.+}-{2:2} { HARDIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228 do_wait+0x235/0xa20 kernel/exit.c:1602 kernel_wait+0x9b/0x130 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:137 [inline] call_usermodehelper_exec_work+0xbf/0x140 kernel/umh.c:164 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 SOFTIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228 do_wait+0x235/0xa20 kernel/exit.c:1602 kernel_wait+0x9b/0x130 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:137 [inline] call_usermodehelper_exec_work+0xbf/0x140 kernel/umh.c:164 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __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+0x4410/0x6b40 kernel/fork.c:2398 kernel_clone+0xbc/0x5f0 kernel/fork.c:2679 user_mode_thread+0x9f/0xd0 kernel/fork.c:2755 rest_init+0x22/0x220 init/main.c:701 arch_call_rest_init+0xe/0x20 init/main.c:898 start_kernel+0x2c0/0x370 init/main.c:1152 secondary_startup_64_no_verify+0xce/0xdb INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_read_lock include/linux/rwlock_api_smp.h:150 [inline] _raw_read_lock+0x5f/0x70 kernel/locking/spinlock.c:228 do_wait+0x235/0xa20 kernel/exit.c:1602 kernel_wait+0x9b/0x130 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:137 [inline] call_usermodehelper_exec_work+0xbf/0x140 kernel/umh.c:164 process_one_work+0x865/0x1400 kernel/workqueue.c:2390 worker_thread+0x59c/0xec0 kernel/workqueue.c:2537 kthread+0x298/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 } ... key at: [] 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_sigio+0x90/0x2c0 fs/fcntl.c:793 kill_fasync_rcu fs/fcntl.c:1004 [inline] kill_fasync fs/fcntl.c:1018 [inline] kill_fasync+0x17a/0x370 fs/fcntl.c:1011 fsnotify_insert_event+0x31d/0x4f0 fs/notify/notification.c:128 fsnotify_add_event include/linux/fsnotify_backend.h:627 [inline] inotify_handle_inode_event+0x295/0x580 fs/notify/inotify/inotify_fsnotify.c:119 fsnotify_handle_event fs/notify/fsnotify.c:316 [inline] send_to_group fs/notify/fsnotify.c:364 [inline] fsnotify+0xcc3/0x13a0 fs/notify/fsnotify.c:570 fsnotify_name include/linux/fsnotify.h:36 [inline] fsnotify_name include/linux/fsnotify.h:29 [inline] fsnotify_dirent include/linux/fsnotify.h:42 [inline] fsnotify_create include/linux/fsnotify.h:207 [inline] open_last_lookups fs/namei.c:3486 [inline] path_openat+0xc1f/0x2280 fs/namei.c:3712 do_filp_open+0x1a9/0x3e0 fs/namei.c:3742 do_sys_openat2+0x11e/0x3f0 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x11f/0x1d0 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> (&f->f_owner.lock){....}-{2:2} { INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline] _raw_write_lock_irq+0x36/0x50 kernel/locking/spinlock.c:326 f_modown+0x23/0x320 fs/fcntl.c:92 __f_setown fs/fcntl.c:111 [inline] f_setown+0x8a/0x180 fs/fcntl.c:139 do_fcntl+0x2a6/0xd90 fs/fcntl.c:378 __do_sys_fcntl fs/fcntl.c:455 [inline] __se_sys_fcntl fs/fcntl.c:440 [inline] __x64_sys_fcntl+0x118/0x160 fs/fcntl.c:440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __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+0x20/0x2c0 fs/fcntl.c:779 kill_fasync_rcu fs/fcntl.c:1004 [inline] kill_fasync fs/fcntl.c:1018 [inline] kill_fasync+0x17a/0x370 fs/fcntl.c:1011 fsnotify_insert_event+0x31d/0x4f0 fs/notify/notification.c:128 fsnotify_add_event include/linux/fsnotify_backend.h:627 [inline] inotify_handle_inode_event+0x295/0x580 fs/notify/inotify/inotify_fsnotify.c:119 fsnotify_handle_event fs/notify/fsnotify.c:316 [inline] send_to_group fs/notify/fsnotify.c:364 [inline] fsnotify+0xcc3/0x13a0 fs/notify/fsnotify.c:570 fsnotify_name include/linux/fsnotify.h:36 [inline] fsnotify_name include/linux/fsnotify.h:29 [inline] fsnotify_dirent include/linux/fsnotify.h:42 [inline] fsnotify_create include/linux/fsnotify.h:207 [inline] open_last_lookups fs/namei.c:3486 [inline] path_openat+0xc1f/0x2280 fs/namei.c:3712 do_filp_open+0x1a9/0x3e0 fs/namei.c:3742 do_sys_openat2+0x11e/0x3f0 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x11f/0x1d0 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd } ... key at: [] __key.5+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 send_sigio+0x20/0x2c0 fs/fcntl.c:779 kill_fasync_rcu fs/fcntl.c:1004 [inline] kill_fasync fs/fcntl.c:1018 [inline] kill_fasync+0x17a/0x370 fs/fcntl.c:1011 fsnotify_insert_event+0x31d/0x4f0 fs/notify/notification.c:128 fsnotify_add_event include/linux/fsnotify_backend.h:627 [inline] inotify_handle_inode_event+0x295/0x580 fs/notify/inotify/inotify_fsnotify.c:119 fsnotify_handle_event fs/notify/fsnotify.c:316 [inline] send_to_group fs/notify/fsnotify.c:364 [inline] fsnotify+0xcc3/0x13a0 fs/notify/fsnotify.c:570 fsnotify_name include/linux/fsnotify.h:36 [inline] fsnotify_name include/linux/fsnotify.h:29 [inline] fsnotify_dirent include/linux/fsnotify.h:42 [inline] fsnotify_create include/linux/fsnotify.h:207 [inline] open_last_lookups fs/namei.c:3486 [inline] path_openat+0xc1f/0x2280 fs/namei.c:3712 do_filp_open+0x1a9/0x3e0 fs/namei.c:3742 do_sys_openat2+0x11e/0x3f0 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x11f/0x1d0 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> (&new->fa_lock){....}-{2:2} { INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __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:997 [inline] kill_fasync fs/fcntl.c:1018 [inline] kill_fasync+0xe9/0x370 fs/fcntl.c:1011 fsnotify_insert_event+0x31d/0x4f0 fs/notify/notification.c:128 fsnotify_add_event include/linux/fsnotify_backend.h:627 [inline] inotify_handle_inode_event+0x295/0x580 fs/notify/inotify/inotify_fsnotify.c:119 fsnotify_handle_event fs/notify/fsnotify.c:316 [inline] send_to_group fs/notify/fsnotify.c:364 [inline] fsnotify+0xcc3/0x13a0 fs/notify/fsnotify.c:570 fsnotify_name include/linux/fsnotify.h:36 [inline] fsnotify_name include/linux/fsnotify.h:29 [inline] fsnotify_dirent include/linux/fsnotify.h:42 [inline] fsnotify_create include/linux/fsnotify.h:207 [inline] open_last_lookups fs/namei.c:3486 [inline] path_openat+0xc1f/0x2280 fs/namei.c:3712 do_filp_open+0x1a9/0x3e0 fs/namei.c:3742 do_sys_openat2+0x11e/0x3f0 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x11f/0x1d0 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd } ... key at: [] __key.0+0x0/0x40 ... acquired at: lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __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:997 [inline] kill_fasync fs/fcntl.c:1018 [inline] kill_fasync+0xe9/0x370 fs/fcntl.c:1011 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values.part.0+0x577/0xb10 drivers/input/evdev.c:278 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x293/0x310 drivers/input/evdev.c:306 input_to_handler+0x23d/0x4a0 drivers/input/input.c:129 input_pass_values.part.0+0x1a3/0x580 drivers/input/input.c:161 input_pass_values drivers/input/input.c:148 [inline] input_event_dispose+0x4ef/0x6d0 drivers/input/input.c:376 input_inject_event+0x183/0x240 drivers/input/input.c:463 evdev_write+0x359/0x6c0 drivers/input/evdev.c:530 vfs_write+0x209/0xd80 fs/read_write.c:582 ksys_write+0x16f/0x1c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd stack backtrace: CPU: 1 PID: 5601 Comm: syz-executor.0 Not tainted 6.3.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x64/0xb0 lib/dump_stack.c:106 print_bad_irq_dependency kernel/locking/lockdep.c:2612 [inline] check_irq_usage+0x114e/0x1a40 kernel/locking/lockdep.c:2851 check_prev_add kernel/locking/lockdep.c:3102 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2edf/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1af/0x520 kernel/locking/lockdep.c:5634 __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:997 [inline] kill_fasync fs/fcntl.c:1018 [inline] kill_fasync+0xe9/0x370 fs/fcntl.c:1011 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values.part.0+0x577/0xb10 drivers/input/evdev.c:278 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x293/0x310 drivers/input/evdev.c:306 input_to_handler+0x23d/0x4a0 drivers/input/input.c:129 input_pass_values.part.0+0x1a3/0x580 drivers/input/input.c:161 input_pass_values drivers/input/input.c:148 [inline] input_event_dispose+0x4ef/0x6d0 drivers/input/input.c:376 input_inject_event+0x183/0x240 drivers/input/input.c:463 evdev_write+0x359/0x6c0 drivers/input/evdev.c:530 vfs_write+0x209/0xd80 fs/read_write.c:582 ksys_write+0x16f/0x1c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f85f1a8c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f85f2875168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f85f1babf80 RCX: 00007f85f1a8c0c9 RDX: 0000000000002ad8 RSI: 0000000020000040 RDI: 0000000000000005 RBP: 00007f85f1ae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc9a17c5ef R14: 00007f85f2875300 R15: 0000000000022000