============================================ WARNING: possible recursive locking detected 6.1.111-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:5/2471 is trying to acquire lock: ffff88807ce70218 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x147/0x4a0 kernel/bpf/queue_stack_maps.c:144 but task is already holding lock: ffff888058268218 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x147/0x4a0 kernel/bpf/queue_stack_maps.c:144 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&qs->lock); lock(&qs->lock); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by kworker/u4:5/2471: #0: ffff88802e49e938 ((wq_completion)bat_events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267 #1: ffffc90009f17d20 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267 #2: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #2: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #2: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline] #2: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: batadv_nc_worker+0xc7/0x610 net/batman-adv/network-coding.c:719 #3: ffff8880b8e3a9d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537 #4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #4: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16a/0x470 kernel/trace/bpf_trace.c:2314 #5: ffff888058268218 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x147/0x4a0 kernel/bpf/queue_stack_maps.c:144 #6: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #6: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #6: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #6: ffffffff8d32b000 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 0 PID: 2471 Comm: kworker/u4:5 Not tainted 6.1.111-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline] check_deadlock kernel/locking/lockdep.c:3026 [inline] validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049 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 __stack_map_get+0x147/0x4a0 kernel/bpf/queue_stack_maps.c:144 bpf_prog_00798911c748094f+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 trace_contention_end+0x14c/0x190 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x935/0xc50 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline] queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x269/0x370 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xdd/0x120 kernel/locking/spinlock.c:162 __stack_map_get+0x147/0x4a0 kernel/bpf/queue_stack_maps.c:144 bpf_prog_00798911c748094f+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314 __traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x2128/0x4570 kernel/sched/core.c:6555 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870 irqentry_exit+0x53/0x80 kernel/entry/common.c:439 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 RIP: 0010:debug_lockdep_rcu_enabled+0x9/0x30 kernel/rcu/update.c:280 Code: c7 e0 01 0c 8b 48 c7 c6 00 26 0c 8b e8 f0 c0 ab f6 0f 0b eb d0 cc cc cc cc cc cc cc cc cc cc cc cc 31 c0 83 3d 67 05 f3 03 00 <74> 1d 83 3d f2 38 f3 03 00 74 14 65 48 8b 0d 04 8e 5b 75 31 c0 83 RSP: 0018:ffffc90009f17bf0 EFLAGS: 00000202 RAX: 0000000000000000 RBX: ffff88805af47780 RCX: ffff88802d129dc0 RDX: 0000000000000000 RSI: ffffffff8b5d6da0 RDI: ffffffff8b5d6d60 RBP: 0000000000000000 R08: ffffffff8a77926d R09: fffffbfff223b845 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88805efc4c80 R13: 00000000000002a4 R14: ffff88805af47780 R15: dffffc0000000000 rcu_read_unlock include/linux/rcupdate.h:820 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline] batadv_nc_worker+0x1ef/0x610 net/batman-adv/network-coding.c:719 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:295 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e0 01 loopne 0x3 2: 0c 8b or $0x8b,%al 4: 48 c7 c6 00 26 0c 8b mov $0xffffffff8b0c2600,%rsi b: e8 f0 c0 ab f6 call 0xf6abc100 10: 0f 0b ud2 12: eb d0 jmp 0xffffffe4 14: cc int3 15: cc int3 16: cc int3 17: cc int3 18: cc int3 19: cc int3 1a: cc int3 1b: cc int3 1c: cc int3 1d: cc int3 1e: cc int3 1f: cc int3 20: 31 c0 xor %eax,%eax 22: 83 3d 67 05 f3 03 00 cmpl $0x0,0x3f30567(%rip) # 0x3f30590 * 29: 74 1d je 0x48 <-- trapping instruction 2b: 83 3d f2 38 f3 03 00 cmpl $0x0,0x3f338f2(%rip) # 0x3f33924 32: 74 14 je 0x48 34: 65 48 8b 0d 04 8e 5b mov %gs:0x755b8e04(%rip),%rcx # 0x755b8e40 3b: 75 3c: 31 c0 xor %eax,%eax 3e: 83 .byte 0x83