================================ WARNING: inconsistent lock state 6.7.0-rc1-next-20231117-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. udevd/4512 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88803a98ca18 (&sighand->siglock){?.+.}-{2:2}, at: __lock_task_sighand+0xc2/0x340 kernel/signal.c:1422 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x530 kernel/locking/lockdep.c:5718 __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:351 [inline] class_spinlock_constructor include/linux/spinlock.h:530 [inline] ptrace_set_stopped kernel/ptrace.c:391 [inline] ptrace_attach+0x401/0x650 kernel/ptrace.c:478 __do_sys_ptrace+0x204/0x230 kernel/ptrace.c:1290 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a irq event stamp: 3928126 hardirqs last enabled at (3928125): [] irqentry_exit+0x3b/0x80 kernel/entry/common.c:435 hardirqs last disabled at (3928126): [] sysvec_apic_timer_interrupt+0xe/0xb0 arch/x86/kernel/apic/apic.c:1076 softirqs last enabled at (3927872): [] softirq_handle_end kernel/softirq.c:399 [inline] softirqs last enabled at (3927872): [] __do_softirq+0x591/0x8d5 kernel/softirq.c:582 softirqs last disabled at (3927761): [] invoke_softirq kernel/softirq.c:427 [inline] softirqs last disabled at (3927761): [] __irq_exit_rcu kernel/softirq.c:632 [inline] softirqs last disabled at (3927761): [] irq_exit_rcu+0xb5/0x120 kernel/softirq.c:644 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sighand->siglock); lock(&sighand->siglock); *** DEADLOCK *** 4 locks held by udevd/4512: #0: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #0: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #0: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: path_init+0x6ec/0x1930 fs/namei.c:2363 #1: ffff8880202d8038 (&new_timer->it_lock){-...}-{2:2}, at: posix_timer_fn+0x2d/0x3d0 kernel/time/posix-timers.c:318 #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: send_sigqueue+0x10c/0x840 kernel/signal.c:1978 #3: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #3: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #3: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x3f/0x340 kernel/signal.c:1405 stack backtrace: CPU: 0 PID: 4512 Comm: udevd Not tainted 6.7.0-rc1-next-20231117-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3970 [inline] valid_state kernel/locking/lockdep.c:4012 [inline] mark_lock_irq kernel/locking/lockdep.c:4215 [inline] mark_lock+0x91a/0xc50 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0x1347/0x3b10 kernel/locking/lockdep.c:5090 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x530 kernel/locking/lockdep.c:5718 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162 __lock_task_sighand+0xc2/0x340 kernel/signal.c:1422 lock_task_sighand include/linux/sched/signal.h:748 [inline] send_sigqueue+0x1d4/0x840 kernel/signal.c:1996 posix_timer_event kernel/time/posix-timers.c:298 [inline] posix_timer_fn+0x181/0x3d0 kernel/time/posix-timers.c:324 __run_hrtimer kernel/time/hrtimer.c:1688 [inline] __hrtimer_run_queues+0x20c/0xc20 kernel/time/hrtimer.c:1752 hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline] __sysvec_apic_timer_interrupt+0x10c/0x410 arch/x86/kernel/apic/apic.c:1082 sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:preempt_schedule_thunk+0x0/0x30 arch/x86/entry/thunk_64.S:45 Code: 48 c7 c7 00 00 60 ff 45 31 e4 48 89 de e8 f8 89 87 00 48 81 fb 00 00 60 ff 41 0f 94 c4 e8 58 8e 87 00 44 89 e0 5b 5d 41 5c c3 0f 1e fa 55 48 89 e5 57 56 52 51 50 41 50 41 51 41 52 41 53 e8 RSP: 0018:ffffc900031af950 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff888148cd1520 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: 000000000000006a R08: 0000000000000000 R09: ffffed102919a2a4 R10: ffff888148cd1523 R11: 0000000000000001 R12: 0000000000000001 R13: ffffc900031afc68 R14: ffff88801b5aa8d0 R15: 0000000000000006 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_unlock+0x3a/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] lockref_get_not_dead+0x6a/0x80 lib/lockref.c:190 __legitimize_path+0x7f/0x1c0 fs/namei.c:712 legitimize_path fs/namei.c:722 [inline] legitimize_root fs/namei.c:750 [inline] try_to_unlazy+0x31d/0x650 fs/namei.c:785 may_lookup fs/namei.c:1722 [inline] link_path_walk.part.0.constprop.0+0x7c7/0xce0 fs/namei.c:2272 link_path_walk fs/namei.c:2255 [inline] path_openat+0x23d/0x2c50 fs/namei.c:3777 do_filp_open+0x1dc/0x430 fs/namei.c:3811 do_sys_openat2+0x176/0x1e0 fs/open.c:1440 do_sys_open fs/open.c:1455 [inline] __do_sys_openat fs/open.c:1471 [inline] __se_sys_openat fs/open.c:1466 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1466 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a RIP: 0033:0x7faf87b1a477 Code: 10 00 00 00 44 8b 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 82 69 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007fffa11dd7a8 EFLAGS: 00000287 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000055c88daee040 RCX: 00007faf87b1a477 RDX: 0000000000090800 RSI: 000055c88dad3310 RDI: 00000000ffffff9c RBP: 000055c88db0b130 R08: 0000000000090800 R09: 000055c88dad3310 R10: 0000000000000000 R11: 0000000000000287 R12: 000055c88dad3310 R13: 00000000000000ff R14: 000055c88cab21c4 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 48 c7 c7 00 00 60 ff mov $0xffffffffff600000,%rdi 7: 45 31 e4 xor %r12d,%r12d a: 48 89 de mov %rbx,%rsi d: e8 f8 89 87 00 call 0x878a0a 12: 48 81 fb 00 00 60 ff cmp $0xffffffffff600000,%rbx 19: 41 0f 94 c4 sete %r12b 1d: e8 58 8e 87 00 call 0x878e7a 22: 44 89 e0 mov %r12d,%eax 25: 5b pop %rbx 26: 5d pop %rbp 27: 41 5c pop %r12 29: c3 ret * 2a: f3 0f 1e fa endbr64 <-- trapping instruction 2e: 55 push %rbp 2f: 48 89 e5 mov %rsp,%rbp 32: 57 push %rdi 33: 56 push %rsi 34: 52 push %rdx 35: 51 push %rcx 36: 50 push %rax 37: 41 50 push %r8 39: 41 51 push %r9 3b: 41 52 push %r10 3d: 41 53 push %r11 3f: e8 .byte 0xe8