===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.1.87-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.0/15045 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffff8ce0a058 (tasklist_lock){.+.+}-{2:2}, at: send_sigio+0xf8/0x360 fs/fcntl.c:790 and this task is already holding: ffff888013aa48b0 (&f->f_owner.lock){...-}-{2:2}, at: send_sigio+0x2f/0x360 fs/fcntl.c:776 which would create a new lock dependency: (&f->f_owner.lock){...-}-{2:2} -> (tasklist_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+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 input_event+0x8d/0xd0 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+0x50/0x200 drivers/input/mouse/psmouse-base.c:139 psmouse_process_byte+0x45b/0x640 drivers/input/mouse/psmouse-base.c:230 psmouse_handle_byte+0x46/0x4b0 drivers/input/mouse/psmouse-base.c:272 psmouse_interrupt+0x697/0x10a0 drivers/input/mouse/psmouse-base.c:424 serio_interrupt+0x88/0x130 drivers/input/serio/serio.c:998 i8042_interrupt+0x357/0x750 drivers/input/serio/i8042.c:606 __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x245/0xbf0 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+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] i8042_command drivers/input/serio/i8042.c:356 [inline] i8042_aux_write+0x112/0x190 drivers/input/serio/i8042.c:391 serio_write include/linux/serio.h:125 [inline] ps2_do_sendbyte+0x20a/0x720 drivers/input/serio/libps2.c:41 ps2_sendbyte+0x5c/0x120 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+0x21d/0x900 drivers/input/mouse/cypress_ps2.c:189 cypress_detect+0x8f/0x220 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+0xc2a/0x1550 drivers/input/mouse/psmouse-base.c:1144 psmouse_switch_protocol+0x308/0x840 drivers/input/mouse/psmouse-base.c:1538 psmouse_connect+0x903/0x14c0 drivers/input/mouse/psmouse-base.c:1628 serio_connect_driver drivers/input/serio/serio.c:44 [inline] serio_driver_probe+0x74/0x90 drivers/input/serio/serio.c:775 really_probe+0x2ab/0xcb0 drivers/base/dd.c:639 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785 driver_probe_device+0x50/0x420 drivers/base/dd.c:815 __driver_attach+0x458/0x6f0 drivers/base/dd.c:1201 bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:301 serio_attach_driver drivers/input/serio/serio.c:804 [inline] serio_handle_event+0x56a/0x8f0 drivers/input/serio/serio.c:224 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 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+0x1f8/0x5a0 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+0x2c6/0xb80 kernel/exit.c:1602 kernel_wait+0xe5/0x230 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:140 [inline] call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 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 --> &f->f_owner.lock --> tasklist_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(tasklist_lock); local_irq_disable(); lock(&dev->event_lock#2); lock(&f->f_owner.lock); lock(&dev->event_lock#2); *** DEADLOCK *** 5 locks held by syz-executor.0/15045: #0: ffff88801321e460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393 #1: ffff888070deb628 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff888070deb628 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: open_last_lookups fs/namei.c:3549 [inline] #1: ffff888070deb628 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: path_openat+0x7b6/0x2e60 fs/namei.c:3782 #2: ffffffff91d5fac8 (&fsnotify_mark_srcu){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #2: ffffffff91d5fac8 (&fsnotify_mark_srcu){....}-{0:0}, at: srcu_read_lock include/linux/srcu.h:165 [inline] #2: ffffffff91d5fac8 (&fsnotify_mark_srcu){....}-{0:0}, at: fsnotify+0x409/0x2470 fs/notify/fsnotify.c:547 #3: ffff88805a7a3038 (&mark->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #3: ffff88805a7a3038 (&mark->lock){+.+.}-{2:2}, at: dnotify_handle_event+0x5d/0x440 fs/notify/dnotify/dnotify.c:107 #4: ffff888013aa48b0 (&f->f_owner.lock){...-}-{2:2}, at: send_sigio+0x2f/0x360 fs/fcntl.c:776 the dependencies between HARDIRQ-irq-safe lock and the holding lock: -> (&dev->event_lock#2){-...}-{2:2} { IN-HARDIRQ-W at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 input_event+0x8d/0xd0 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+0x50/0x200 drivers/input/mouse/psmouse-base.c:139 psmouse_process_byte+0x45b/0x640 drivers/input/mouse/psmouse-base.c:230 psmouse_handle_byte+0x46/0x4b0 drivers/input/mouse/psmouse-base.c:272 psmouse_interrupt+0x697/0x10a0 drivers/input/mouse/psmouse-base.c:424 serio_interrupt+0x88/0x130 drivers/input/serio/serio.c:998 i8042_interrupt+0x357/0x750 drivers/input/serio/i8042.c:606 __handle_irq_event_percpu+0x2a8/0xb20 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x85/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x245/0xbf0 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+0xd7/0x1f0 arch/x86/kernel/irq.c:250 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] i8042_command drivers/input/serio/i8042.c:356 [inline] i8042_aux_write+0x112/0x190 drivers/input/serio/i8042.c:391 serio_write include/linux/serio.h:125 [inline] ps2_do_sendbyte+0x20a/0x720 drivers/input/serio/libps2.c:41 ps2_sendbyte+0x5c/0x120 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+0x21d/0x900 drivers/input/mouse/cypress_ps2.c:189 cypress_detect+0x8f/0x220 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+0xc2a/0x1550 drivers/input/mouse/psmouse-base.c:1144 psmouse_switch_protocol+0x308/0x840 drivers/input/mouse/psmouse-base.c:1538 psmouse_connect+0x903/0x14c0 drivers/input/mouse/psmouse-base.c:1628 serio_connect_driver drivers/input/serio/serio.c:44 [inline] serio_driver_probe+0x74/0x90 drivers/input/serio/serio.c:775 really_probe+0x2ab/0xcb0 drivers/base/dd.c:639 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785 driver_probe_device+0x50/0x420 drivers/base/dd.c:815 __driver_attach+0x458/0x6f0 drivers/base/dd.c:1201 bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:301 serio_attach_driver drivers/input/serio/serio.c:804 [inline] serio_handle_event+0x56a/0x8f0 drivers/input/serio/serio.c:224 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 input_inject_event+0xc1/0x330 drivers/input/input.c:456 led_trigger_event+0x114/0x1d0 drivers/leds/led-triggers.c:390 kbd_led_trigger_activate+0xb9/0x100 drivers/tty/vt/keyboard.c:1036 led_trigger_set+0x53a/0x910 drivers/leds/led-triggers.c:197 led_trigger_set_default+0x1c2/0x200 drivers/leds/led-triggers.c:262 led_classdev_register_ext+0x600/0x7e0 drivers/leds/led-class.c:419 led_classdev_register include/linux/leds.h:196 [inline] input_leds_connect+0x48f/0x630 drivers/input/input-leds.c:139 input_attach_handler drivers/input/input.c:1060 [inline] input_register_device+0xcec/0x1080 drivers/input/input.c:2396 atkbd_connect+0x79d/0x9e0 drivers/input/keyboard/atkbd.c:1321 serio_connect_driver drivers/input/serio/serio.c:44 [inline] serio_driver_probe+0x74/0x90 drivers/input/serio/serio.c:775 really_probe+0x2ab/0xcb0 drivers/base/dd.c:639 __driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785 driver_probe_device+0x50/0x420 drivers/base/dd.c:815 __driver_attach+0x458/0x6f0 drivers/base/dd.c:1201 bus_for_each_dev+0x17c/0x1f0 drivers/base/bus.c:301 serio_attach_driver drivers/input/serio/serio.c:804 [inline] serio_handle_event+0x56a/0x8f0 drivers/input/serio/serio.c:224 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 } ... key at: [] input_allocate_device.__key.5+0x0/0x20 -> (&new->fa_lock){...-}-{2:2} { IN-SOFTIRQ-R at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:994 [inline] kill_fasync+0x196/0x4d0 fs/fcntl.c:1015 sock_wake_async+0x145/0x170 sk_wake_async+0x186/0x280 include/net/sock.h:2588 sock_def_readable+0x1a7/0x280 net/core/sock.c:3306 tcp_data_queue+0x21c5/0x6fd0 net/ipv4/tcp_input.c:5102 tcp_rcv_state_process+0x2682/0x4510 net/ipv4/tcp_input.c:6704 tcp_v6_do_rcv+0x91c/0x1270 net/ipv6/tcp_ipv6.c:1514 tcp_v6_rcv+0x234e/0x2b60 net/ipv6/tcp_ipv6.c:1753 ip6_protocol_deliver_rcu+0xb1a/0x1340 net/ipv6/ip6_input.c:438 ip6_input_finish+0x183/0x2c0 net/ipv6/ip6_input.c:483 NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302 NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5528 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5642 process_backlog+0x381/0x760 net/core/dev.c:5970 __napi_poll+0xc7/0x470 net/core/dev.c:6537 napi_poll net/core/dev.c:6604 [inline] net_rx_action+0x70f/0xeb0 net/core/dev.c:6718 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 crng_make_state+0x68d/0xb50 drivers/char/random.c:354 _get_random_bytes+0xd3/0x2b0 drivers/char/random.c:366 eth_random_addr include/linux/etherdevice.h:232 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:756 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline] nsim_dev_trap_report_work+0x327/0xa90 drivers/net/netdevsim/dev.c:850 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline] _raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:326 fasync_remove_entry+0xfb/0x1d0 fs/fcntl.c:871 lease_modify+0x19c/0x380 fs/locks.c:1386 locks_remove_lease fs/locks.c:2624 [inline] locks_remove_file+0x5d3/0x1040 fs/locks.c:2649 __fput+0x326/0x890 fs/file_table.c:312 task_work_run+0x246/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 INITIAL READ USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:994 [inline] kill_fasync+0x196/0x4d0 fs/fcntl.c:1015 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x586/0xad0 drivers/input/evdev.c:278 evdev_events+0x1be/0x2f0 drivers/input/evdev.c:306 input_to_handler drivers/input/input.c:127 [inline] input_pass_values+0x8e0/0x12a0 drivers/input/input.c:159 input_event_dispose+0x366/0x650 drivers/input/input.c:374 input_handle_event+0x97d/0xb00 drivers/input/input.c:402 input_inject_event+0x224/0x330 drivers/input/input.c:461 evdev_write+0x668/0x7c0 drivers/input/evdev.c:530 vfs_write+0x2d9/0xba0 fs/read_write.c:582 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 } ... key at: [] fasync_insert_entry.__key+0x0/0x20 ... acquired at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236 kill_fasync_rcu fs/fcntl.c:994 [inline] kill_fasync+0x196/0x4d0 fs/fcntl.c:1015 mousedev_notify_readers+0x6bb/0xc60 drivers/input/mousedev.c:309 mousedev_event+0x553/0x1220 drivers/input/mousedev.c:394 input_to_handler drivers/input/input.c:130 [inline] input_pass_values+0x9ee/0x12a0 drivers/input/input.c:159 input_event_dispose+0x366/0x650 drivers/input/input.c:374 input_handle_event+0x97d/0xb00 drivers/input/input.c:402 input_inject_event+0x224/0x330 drivers/input/input.c:461 evdev_write+0x668/0x7c0 drivers/input/evdev.c:530 vfs_write+0x2d9/0xba0 fs/read_write.c:582 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> (&f->f_owner.lock){...-}-{2:2} { IN-SOFTIRQ-R at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236 send_sigurg+0x25/0x3b0 fs/fcntl.c:815 sk_send_sigurg+0x6a/0xb0 net/core/sock.c:3362 tcp_check_urg+0x202/0x740 net/ipv4/tcp_input.c:5637 tcp_urg+0x154/0x440 net/ipv4/tcp_input.c:5678 tcp_rcv_state_process+0x247d/0x4510 net/ipv4/tcp_input.c:6672 tcp_v6_do_rcv+0x91c/0x1270 net/ipv6/tcp_ipv6.c:1514 tcp_v6_rcv+0x234e/0x2b60 net/ipv6/tcp_ipv6.c:1753 ip6_protocol_deliver_rcu+0xb1a/0x1340 net/ipv6/ip6_input.c:438 ip6_input_finish+0x183/0x2c0 net/ipv6/ip6_input.c:483 NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302 NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5528 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5642 process_backlog+0x381/0x760 net/core/dev.c:5970 __napi_poll+0xc7/0x470 net/core/dev.c:6537 napi_poll net/core/dev.c:6604 [inline] net_rx_action+0x70f/0xeb0 net/core/dev.c:6718 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 crng_make_state+0x68d/0xb50 drivers/char/random.c:354 _get_random_bytes+0xd3/0x2b0 drivers/char/random.c:366 eth_random_addr include/linux/etherdevice.h:232 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:756 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline] nsim_dev_trap_report_work+0x327/0xa90 drivers/net/netdevsim/dev.c:850 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline] _raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:326 f_modown+0x38/0x340 fs/fcntl.c:91 generic_add_lease fs/locks.c:1806 [inline] generic_setlease+0xf3f/0x1440 fs/locks.c:1886 vfs_setlease fs/locks.c:1976 [inline] do_fcntl_add_lease fs/locks.c:1997 [inline] fcntl_setlease+0x341/0x3f0 fs/locks.c:2019 do_fcntl+0x10a/0x1510 fs/fcntl.c:401 __do_sys_fcntl fs/fcntl.c:452 [inline] __se_sys_fcntl+0xd5/0x1b0 fs/fcntl.c:437 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 INITIAL READ USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_read_lock_irq include/linux/rwlock_api_smp.h:169 [inline] _raw_read_lock_irq+0xd6/0x120 kernel/locking/spinlock.c:244 f_getown_ex fs/fcntl.c:212 [inline] do_fcntl+0x1e7/0x1510 fs/fcntl.c:378 __do_sys_fcntl fs/fcntl.c:452 [inline] __se_sys_fcntl+0xd5/0x1b0 fs/fcntl.c:437 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 } ... key at: [] __alloc_file.__key+0x0/0x10 ... acquired at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xd9/0x120 kernel/locking/spinlock.c:236 send_sigio+0x2f/0x360 fs/fcntl.c:776 kill_fasync_rcu fs/fcntl.c:1001 [inline] kill_fasync+0x232/0x4d0 fs/fcntl.c:1015 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x586/0xad0 drivers/input/evdev.c:278 evdev_events+0x1be/0x2f0 drivers/input/evdev.c:306 input_to_handler drivers/input/input.c:127 [inline] input_pass_values+0x8e0/0x12a0 drivers/input/input.c:159 input_event_dispose+0x366/0x650 drivers/input/input.c:374 input_handle_event+0x97d/0xb00 drivers/input/input.c:402 input_inject_event+0x224/0x330 drivers/input/input.c:461 evdev_write+0x668/0x7c0 drivers/input/evdev.c:530 vfs_write+0x2d9/0xba0 fs/read_write.c:582 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 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+0x1f8/0x5a0 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+0x2c6/0xb80 kernel/exit.c:1602 kernel_wait+0xe5/0x230 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:140 [inline] call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 SOFTIRQ-ON-R at: lock_acquire+0x1f8/0x5a0 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+0x2c6/0xb80 kernel/exit.c:1602 kernel_wait+0xe5/0x230 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:140 [inline] call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INITIAL USE at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline] _raw_write_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:326 copy_process+0x24b6/0x4060 kernel/fork.c:2401 kernel_clone+0x222/0x920 kernel/fork.c:2682 user_mode_thread+0x12e/0x190 kernel/fork.c:2758 rest_init+0x23/0x300 init/main.c:697 start_kernel+0x0/0x53f init/main.c:892 start_kernel+0x496/0x53f init/main.c:1139 secondary_startup_64_no_verify+0xcf/0xdb INITIAL READ USE at: lock_acquire+0x1f8/0x5a0 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+0x2c6/0xb80 kernel/exit.c:1602 kernel_wait+0xe5/0x230 kernel/exit.c:1792 call_usermodehelper_exec_sync kernel/umh.c:140 [inline] call_usermodehelper_exec_work+0xb5/0x220 kernel/umh.c:167 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 } ... key at: [] tasklist_lock+0x18/0x40 ... acquired at: lock_acquire+0x1f8/0x5a0 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 send_sigio+0xf8/0x360 fs/fcntl.c:790 dnotify_handle_event+0x138/0x440 fs/notify/dnotify/dnotify.c:115 fsnotify_handle_inode_event fs/notify/fsnotify.c:264 [inline] fsnotify_handle_event fs/notify/fsnotify.c:316 [inline] send_to_group fs/notify/fsnotify.c:364 [inline] fsnotify+0x1c13/0x2470 fs/notify/fsnotify.c:570 fsnotify_name include/linux/fsnotify.h:36 [inline] fsnotify_dirent include/linux/fsnotify.h:42 [inline] fsnotify_create include/linux/fsnotify.h:207 [inline] open_last_lookups fs/namei.c:3554 [inline] path_openat+0x14e4/0x2e60 fs/namei.c:3782 do_filp_open+0x230/0x480 fs/namei.c:3812 do_sys_openat2+0x13b/0x500 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_creat fs/open.c:1410 [inline] __se_sys_creat fs/open.c:1404 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1404 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 stack backtrace: CPU: 1 PID: 15045 Comm: syz-executor.0 Not tainted 6.1.87-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb 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+0x4d16/0x5950 kernel/locking/lockdep.c:3825 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049 lock_acquire+0x1f8/0x5a0 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 send_sigio+0xf8/0x360 fs/fcntl.c:790 dnotify_handle_event+0x138/0x440 fs/notify/dnotify/dnotify.c:115 fsnotify_handle_inode_event fs/notify/fsnotify.c:264 [inline] fsnotify_handle_event fs/notify/fsnotify.c:316 [inline] send_to_group fs/notify/fsnotify.c:364 [inline] fsnotify+0x1c13/0x2470 fs/notify/fsnotify.c:570 fsnotify_name include/linux/fsnotify.h:36 [inline] fsnotify_dirent include/linux/fsnotify.h:42 [inline] fsnotify_create include/linux/fsnotify.h:207 [inline] open_last_lookups fs/namei.c:3554 [inline] path_openat+0x14e4/0x2e60 fs/namei.c:3782 do_filp_open+0x230/0x480 fs/namei.c:3812 do_sys_openat2+0x13b/0x500 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_creat fs/open.c:1410 [inline] __se_sys_creat fs/open.c:1404 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1404 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7ff3a067dea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff3a14460c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007ff3a07abf80 RCX: 00007ff3a067dea9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007ff3a06ca4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007ff3a07abf80 R15: 00007ffd1516b1f8