================================ WARNING: inconsistent lock state 6.7.0-rc1-next-20231116-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. kworker/u4:0/11 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888059d4ef18 (&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: 1265604 hardirqs last enabled at (1265603): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (1265603): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (1265604): [] sysvec_apic_timer_interrupt+0xe/0xb0 arch/x86/kernel/apic/apic.c:1076 softirqs last enabled at (1265598): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (1265598): [] batadv_nc_purge_paths+0x1ce/0x3c0 net/batman-adv/network-coding.c:471 softirqs last disabled at (1265596): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (1265596): [] batadv_nc_purge_paths+0xd3/0x3c0 net/batman-adv/network-coding.c:442 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sighand->siglock); lock(&sighand->siglock); *** DEADLOCK *** 6 locks held by kworker/u4:0/11: #0: ffff88814c23ed38 ((wq_completion)bat_events){+.+.}-{0:0}, at: process_one_work+0x78c/0x15f0 kernel/workqueue.c:2611 #1: ffffc90000107d80 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work+0x7f6/0x15f0 kernel/workqueue.c:2612 #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: batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline] #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: batadv_nc_worker+0x168/0x10e0 net/batman-adv/network-coding.c:719 #3: ffff88807fa0ed70 (&new_timer->it_lock){-...}-{2:2}, at: posix_timer_fn+0x2d/0x3d0 kernel/time/posix-timers.c:318 #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: send_sigqueue+0x10c/0x840 kernel/signal.c:1978 #5: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #5: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #5: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x3f/0x340 kernel/signal.c:1405 stack backtrace: CPU: 0 PID: 11 Comm: kworker/u4:0 Not tainted 6.7.0-rc1-next-20231116-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Workqueue: bat_events batadv_nc_worker 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:rcu_dynticks_curr_cpu_in_eqs include/linux/context_tracking.h:122 [inline] RIP: 0010:rcu_is_watching+0xd/0xb0 kernel/rcu/tree.c:700 Code: fa 48 c7 c7 20 58 ce 8a e8 40 c7 10 09 65 8a 05 e5 7e 93 7e 0f b6 c0 c3 0f 1f 44 00 00 f3 0f 1e fa 55 53 65 ff 05 2b 64 93 7e fe c6 10 09 48 c7 c3 e8 6d 03 00 83 f8 07 89 c5 77 7a 48 8d 3c RSP: 0018:ffffc90000107b90 EFLAGS: 00000283 RAX: 0000000000000000 RBX: ffff88801d999c78 RCX: ffffffff8a493aaf RDX: ffff888014ab3b80 RSI: ffffffff8a4945b4 RDI: 0000000000000005 RBP: 000000000000038f R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000002 R12: ffff8880592cbf00 R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000001 rcu_read_lock include/linux/rcupdate.h:748 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline] batadv_nc_worker+0xc89/0x10e0 net/batman-adv/network-coding.c:719 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: fa cli 1: 48 c7 c7 20 58 ce 8a mov $0xffffffff8ace5820,%rdi 8: e8 40 c7 10 09 call 0x910c74d d: 65 8a 05 e5 7e 93 7e mov %gs:0x7e937ee5(%rip),%al # 0x7e937ef9 14: 0f b6 c0 movzbl %al,%eax 17: c3 ret 18: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 1d: f3 0f 1e fa endbr64 21: 55 push %rbp 22: 53 push %rbx 23: 65 ff 05 2b 64 93 7e incl %gs:0x7e93642b(%rip) # 0x7e936455 * 2a: e8 fe c6 10 09 call 0x910c72d <-- trapping instruction 2f: 48 c7 c3 e8 6d 03 00 mov $0x36de8,%rbx 36: 83 f8 07 cmp $0x7,%eax 39: 89 c5 mov %eax,%ebp 3b: 77 7a ja 0xb7 3d: 48 rex.W 3e: 8d .byte 0x8d 3f: 3c .byte 0x3c