===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 6.18.0-rc6-next-20251124 #1 Not tainted ----------------------------------------------------- syz-executor.7/416145 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffff85c0c098 (tasklist_lock){.+.+}-{3:3}, at: send_sigio+0xbb/0x370 and this task is already holding: ffff88800dd96720 (&f_owner->lock){....}-{3:3}, at: send_sigio+0x31/0x370 which would create a new lock dependency: (&f_owner->lock){....}-{3:3} -> (tasklist_lock){.+.+}-{3:3} but this new dependency connects a SOFTIRQ-irq-safe lock: (&dev->event_lock){..-.}-{3:3} ... which became SOFTIRQ-irq-safe at: lock_acquire+0x15e/0x2f0 _raw_spin_lock_irqsave+0x3a/0x60 input_inject_event+0x9f/0x3b0 led_set_brightness+0x215/0x290 led_trigger_event+0xda/0x270 kbd_bh+0x23a/0x310 tasklet_action_common+0x235/0x3b0 handle_softirqs+0x1b1/0x770 __irq_exit_rcu+0xc4/0x100 irq_exit_rcu+0x9/0x20 sysvec_apic_timer_interrupt+0x70/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 __up_console_sem+0x7a/0x80 __console_flush_and_unlock+0x1c5/0x1d0 console_unlock+0x80/0xe0 console_callback+0x17d/0x420 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 to a SOFTIRQ-irq-unsafe lock: (tasklist_lock){.+.+}-{3:3} ... which became SOFTIRQ-irq-unsafe at: ... lock_acquire+0x15e/0x2f0 _raw_read_lock+0x5c/0x70 __do_wait+0x13e/0x8f0 do_wait+0x19f/0x560 kernel_wait+0x9f/0x160 call_usermodehelper_exec_work+0xf9/0x180 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 other info that might help us debug this: Chain exists of: &dev->event_lock --> &f_owner->lock --> tasklist_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(tasklist_lock); local_irq_disable(); lock(&dev->event_lock); lock(&f_owner->lock); lock(&dev->event_lock); *** DEADLOCK *** 6 locks held by syz-executor.7/416145: #0: ffff88800f0663f8 (sb_writers#3){.+.+}-{0:0}, at: vfs_truncate+0x171/0x480 #1: ffffffff85f32cf0 (file_rwsem){++++}-{0:0}, at: vfs_truncate+0x30d/0x480 #2: ffff88800e5f96f8 (&ctx->flc_lock){+.+.}-{3:3}, at: __break_lease+0x4ea/0x17e0 #3: ffffffff85e1ff60 (rcu_read_lock){....}-{1:3}, at: kill_fasync+0x61/0x520 #4: ffff8880489cd8a0 (&new->fa_lock){....}-{3:3}, at: kill_fasync+0x137/0x520 #5: ffff88800dd96720 (&f_owner->lock){....}-{3:3}, at: send_sigio+0x31/0x370 the dependencies between SOFTIRQ-irq-safe lock and the holding lock: -> (&dev->event_lock){..-.}-{3:3} { IN-SOFTIRQ-W at: lock_acquire+0x15e/0x2f0 _raw_spin_lock_irqsave+0x3a/0x60 input_inject_event+0x9f/0x3b0 led_set_brightness+0x215/0x290 led_trigger_event+0xda/0x270 kbd_bh+0x23a/0x310 tasklet_action_common+0x235/0x3b0 handle_softirqs+0x1b1/0x770 __irq_exit_rcu+0xc4/0x100 irq_exit_rcu+0x9/0x20 sysvec_apic_timer_interrupt+0x70/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 __up_console_sem+0x7a/0x80 __console_flush_and_unlock+0x1c5/0x1d0 console_unlock+0x80/0xe0 console_callback+0x17d/0x420 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 INITIAL USE at: lock_acquire+0x15e/0x2f0 _raw_spin_lock_irqsave+0x3a/0x60 input_inject_event+0x9f/0x3b0 led_set_brightness+0x215/0x290 kbd_led_trigger_activate+0xcd/0x110 led_trigger_set+0x4cc/0xaa0 led_trigger_set_default+0x1e7/0x2e0 led_classdev_register_ext+0x615/0x950 input_leds_connect+0x49b/0x870 input_attach_handler+0x17a/0x260 input_register_device+0x9ff/0x1050 atkbd_connect+0x5e6/0xa10 serio_driver_probe+0x84/0xe0 really_probe+0x240/0x820 __driver_probe_device+0x2c4/0x380 driver_probe_device+0x4e/0x2a0 __driver_attach+0x1b0/0x590 bus_for_each_dev+0x12b/0x1c0 serio_handle_event+0x23b/0xaa0 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 } ... key at: [] __key.4+0x0/0x40 -> (&client->buffer_lock){....}-{3:3} { INITIAL USE at: lock_acquire+0x15e/0x2f0 _raw_spin_lock_irqsave+0x3a/0x60 evdev_do_ioctl+0x2e5/0x1990 evdev_ioctl+0x14a/0x1b0 __x64_sys_ioctl+0x18f/0x210 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f } ... key at: [] __key.90+0x0/0x40 ... acquired at: _raw_spin_lock+0x2b/0x40 evdev_handle_get_val+0x70/0x5c0 evdev_do_ioctl+0x854/0x1990 evdev_ioctl+0x14a/0x1b0 __x64_sys_ioctl+0x18f/0x210 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> (&new->fa_lock){....}-{3:3} { INITIAL USE at: lock_acquire+0x15e/0x2f0 _raw_write_lock_irq+0x33/0x50 fasync_remove_entry+0xb2/0x1e0 fasync_helper+0xa6/0xc0 pipe_fasync+0x120/0x210 __fput+0x94b/0xb50 fput_close_sync+0x10f/0x230 __x64_sys_close+0x8f/0x120 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f INITIAL READ USE at: lock_acquire+0x15e/0x2f0 _raw_read_lock_irqsave+0x75/0x90 kill_fasync+0x137/0x520 lease_break_callback+0x23/0x30 __break_lease+0x6c4/0x17e0 do_dentry_open+0x701/0x1460 vfs_open+0x82/0x3f0 path_openat+0x1d3d/0x2a50 do_filp_open+0x1e8/0x450 do_sys_openat2+0x104/0x1b0 __x64_sys_openat+0x142/0x200 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f } ... key at: [] __key.0+0x0/0x40 ... acquired at: _raw_read_lock_irqsave+0x75/0x90 kill_fasync+0x137/0x520 evdev_pass_values.part.0+0x665/0x940 evdev_events+0x3b5/0x430 input_pass_values+0x708/0x860 input_handle_event+0xdcf/0x13d0 input_inject_event+0x1e5/0x3b0 evdev_write+0x2e1/0x420 vfs_write+0x2b7/0x1150 ksys_write+0x1ef/0x240 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> (&f_owner->lock){....}-{3:3} { INITIAL USE at: lock_acquire+0x15e/0x2f0 _raw_write_lock_irq+0x33/0x50 __f_setown+0x60/0x3c0 f_setown+0xf3/0x2d0 do_fcntl+0xff0/0x1500 __x64_sys_fcntl+0x155/0x1f0 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f INITIAL READ USE at: lock_acquire+0x15e/0x2f0 _raw_read_lock_irqsave+0x75/0x90 send_sigurg+0x60/0xc90 sk_send_sigurg+0x76/0x360 unix_stream_sendmsg+0xfce/0x1360 ____sys_sendmsg+0xa67/0xc20 ___sys_sendmsg+0x10f/0x1b0 __sys_sendmsg+0x150/0x200 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f } ... key at: [] __key.1+0x0/0x40 ... acquired at: _raw_read_lock_irqsave+0x75/0x90 send_sigio+0x31/0x370 kill_fasync+0x218/0x520 lease_break_callback+0x23/0x30 __break_lease+0x6c4/0x17e0 do_dentry_open+0x701/0x1460 vfs_open+0x82/0x3f0 path_openat+0x1d3d/0x2a50 do_filp_open+0x1e8/0x450 do_sys_openat2+0x104/0x1b0 __x64_sys_openat+0x142/0x200 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock: -> (tasklist_lock){.+.+}-{3:3} { HARDIRQ-ON-R at: lock_acquire+0x15e/0x2f0 _raw_read_lock+0x5c/0x70 __do_wait+0x13e/0x8f0 do_wait+0x19f/0x560 kernel_wait+0x9f/0x160 call_usermodehelper_exec_work+0xf9/0x180 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 SOFTIRQ-ON-R at: lock_acquire+0x15e/0x2f0 _raw_read_lock+0x5c/0x70 __do_wait+0x13e/0x8f0 do_wait+0x19f/0x560 kernel_wait+0x9f/0x160 call_usermodehelper_exec_work+0xf9/0x180 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 INITIAL USE at: lock_acquire+0x15e/0x2f0 _raw_write_lock_irq+0x33/0x50 copy_process+0x4e77/0x7260 kernel_clone+0xea/0x7f0 user_mode_thread+0xc8/0x110 rest_init+0x24/0x290 start_kernel+0x3fa/0x510 x86_64_start_reservations+0x18/0x30 x86_64_start_kernel+0x109/0x120 common_startup_64+0x13e/0x148 INITIAL READ USE at: lock_acquire+0x15e/0x2f0 _raw_read_lock+0x5c/0x70 __do_wait+0x13e/0x8f0 do_wait+0x19f/0x560 kernel_wait+0x9f/0x160 call_usermodehelper_exec_work+0xf9/0x180 process_one_work+0x8e1/0x19c0 worker_thread+0x67e/0xe90 kthread+0x3c8/0x740 ret_from_fork+0x67a/0x7a0 ret_from_fork_asm+0x1a/0x30 } ... key at: [] tasklist_lock+0x18/0x40 ... acquired at: lock_acquire+0x15e/0x2f0 _raw_read_lock+0x5c/0x70 send_sigio+0xbb/0x370 kill_fasync+0x218/0x520 lease_break_callback+0x23/0x30 __break_lease+0x6c4/0x17e0 vfs_truncate+0x30d/0x480 do_sys_truncate.part.0+0xfa/0x140 __x64_sys_truncate+0x6d/0xa0 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f stack backtrace: CPU: 0 UID: 0 PID: 416145 Comm: syz-executor.7 Not tainted 6.18.0-rc6-next-20251124 #1 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xca/0x120 check_irq_usage+0x6f6/0x790 __lock_acquire+0x13b5/0x1b70 lock_acquire+0x15e/0x2f0 _raw_read_lock+0x5c/0x70 send_sigio+0xbb/0x370 kill_fasync+0x218/0x520 lease_break_callback+0x23/0x30 __break_lease+0x6c4/0x17e0 vfs_truncate+0x30d/0x480 do_sys_truncate.part.0+0xfa/0x140 __x64_sys_truncate+0x6d/0xa0 do_syscall_64+0xbf/0x430 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc3c6659b19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc3c3bcf188 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007fc3c676cf60 RCX: 00007fc3c6659b19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000100 RBP: 00007fc3c66b3f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd5158faaf R14: 00007fc3c3bcf300 R15: 0000000000022000 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.7'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1326 audit(1764063127.782:604): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417757 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.788:605): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417757 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=329 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.788:606): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417757 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.792:607): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417757 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=317 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.793:608): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417757 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.944:609): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417954 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.945:610): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417954 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.945:611): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417954 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=329 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.945:612): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417954 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000 audit: type=1326 audit(1764063127.945:613): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=417954 comm="syz-executor.0" exe="/syz-executor.0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7f12ee3a4b19 code=0x7ffc0000