================================ WARNING: inconsistent lock state 6.7.0-rc1-next-20231117-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. kworker/1:1/27 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888074e1e5d8 (&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: 267952 hardirqs last enabled at (267951): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (267951): [] _raw_spin_unlock_irqrestore+0x4e/0x70 kernel/locking/spinlock.c:194 hardirqs last disabled at (267952): [] sysvec_apic_timer_interrupt+0xe/0xb0 arch/x86/kernel/apic/apic.c:1076 softirqs last enabled at (267744): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (267744): [] nsim_dev_trap_report drivers/net/netdevsim/dev.c:820 [inline] softirqs last enabled at (267744): [] nsim_dev_trap_report_work+0x86a/0xc70 drivers/net/netdevsim/dev.c:850 softirqs last disabled at (267742): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (267742): [] nsim_dev_trap_report drivers/net/netdevsim/dev.c:816 [inline] softirqs last disabled at (267742): [] nsim_dev_trap_report_work+0x7dc/0xc70 drivers/net/netdevsim/dev.c:850 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sighand->siglock); lock(&sighand->siglock); *** DEADLOCK *** 5 locks held by kworker/1:1/27: #0: ffff888013070d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78c/0x15f0 kernel/workqueue.c:2611 #1: ffffc90000a2fd80 ((work_completion)(&(&krcp->krw_arr[i].rcu_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7f6/0x15f0 kernel/workqueue.c:2612 #2: ffff88805092e1b0 (&new_timer->it_lock){-...}-{2:2}, at: posix_timer_fn+0x2d/0x3d0 kernel/time/posix-timers.c:318 #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: send_sigqueue+0x10c/0x840 kernel/signal.c:1978 #4: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #4: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #4: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x3f/0x340 kernel/signal.c:1405 stack backtrace: CPU: 1 PID: 27 Comm: kworker/1:1 Not tainted 6.7.0-rc1-next-20231117-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Workqueue: events kfree_rcu_work 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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x70 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 16 c8 e3 f6 48 89 df e8 ce 3f e4 f6 f7 c5 00 02 00 00 75 1f 9c 58 f6 c4 02 75 2f 01 00 00 00 e8 85 ed d5 f6 65 8b 05 a6 18 7f 75 85 c0 74 12 5b RSP: 0018:ffffc90000a2fa98 EFLAGS: 00000246 RAX: 0000000000000006 RBX: ffffffff92a122e0 RCX: 1ffffffff23ec2a8 RDX: 0000000000000000 RSI: ffffffff8accbfe0 RDI: ffffffff8b2f1520 RBP: 0000000000000202 R08: 0000000000000001 R09: fffffbfff23e33fd R10: ffffffff91f19fef R11: 0000000000000002 R12: 0000000000000006 R13: 1ffff92000145f5a R14: ffffffff8ace4380 R15: ffff888026bec080 debug_object_deactivate lib/debugobjects.c:805 [inline] debug_object_deactivate+0x28b/0x320 lib/debugobjects.c:771 debug_rcu_head_unqueue kernel/rcu/rcu.h:239 [inline] debug_rcu_bhead_unqueue kernel/rcu/tree.c:2906 [inline] kvfree_rcu_bulk+0x12c/0x550 kernel/rcu/tree.c:2983 kfree_rcu_work+0x2f2/0x5a0 kernel/rcu/tree.c:3069 process_one_work+0x8a4/0x15f0 kernel/workqueue.c:2636 process_scheduled_works kernel/workqueue.c:2709 [inline] worker_thread+0x8b6/0x1290 kernel/workqueue.c:2790 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 16 c8 e3 f6 call 0xf6e3c829 13: 48 89 df mov %rbx,%rdi 16: e8 ce 3f e4 f6 call 0xf6e43fe9 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 1f jne 0x42 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 2f jne 0x59 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 85 ed d5 f6 call 0xf6d5edb9 34: 65 8b 05 a6 18 7f 75 mov %gs:0x757f18a6(%rip),%eax # 0x757f18e1 3b: 85 c0 test %eax,%eax 3d: 74 12 je 0x51 3f: 5b pop %rbx