============================================ WARNING: possible recursive locking detected 6.12.0-rc5-syzkaller-00299-g11066801dd4b #0 Not tainted -------------------------------------------- syz.2.601/8490 is trying to acquire lock: ffffc900039810d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 but task is already holding lock: ffffc900037340d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rb->spinlock); lock(&rb->spinlock); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz.2.601/8490: #0: ffffffff8e20f210 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: do_exit+0x54e/0x2d70 kernel/exit.c:896 #1: ffff88806a63ee98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:606 [inline] #1: ffff88806a63ee98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:591 #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline] #2: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2357 #3: ffffc900037340d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 #4: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #4: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #4: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline] #4: ffffffff8e1b8340 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2357 stack backtrace: CPU: 1 UID: 0 PID: 8490 Comm: syz.2.601 Not tainted 6.12.0-rc5-syzkaller-00299-g11066801dd4b #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain kernel/locking/lockdep.c:3891 [inline] __lock_acquire+0x2185/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_output kernel/bpf/ringbuf.c:553 [inline] bpf_ringbuf_output+0x60/0xd0 kernel/bpf/ringbuf.c:543 bpf_prog_a3e2825f60354855+0x46/0x4a bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2357 __bpf_trace_contention_end+0xca/0x110 include/trace/events/lock.h:122 __traceiter_contention_end+0x5a/0xa0 include/trace/events/lock.h:122 trace_contention_end.constprop.0+0xea/0x170 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x27e/0xc90 kernel/locking/qspinlock.c:557 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_output kernel/bpf/ringbuf.c:553 [inline] bpf_ringbuf_output+0x60/0xd0 kernel/bpf/ringbuf.c:543 bpf_prog_a3e2825f60354855+0x46/0x4a bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2357 __bpf_trace_contention_end+0xca/0x110 include/trace/events/lock.h:122 __traceiter_contention_end+0x5a/0xa0 include/trace/events/lock.h:122 trace_contention_end.constprop.0+0xea/0x170 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x27e/0xc90 kernel/locking/qspinlock.c:557 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116 raw_spin_rq_lock_nested kernel/sched/core.c:606 [inline] raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:591 raw_spin_rq_lock kernel/sched/sched.h:1505 [inline] rq_lock kernel/sched/sched.h:1804 [inline] __schedule+0x2a1/0x5730 kernel/sched/core.c:6589 preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7012 irqentry_exit+0x36/0x90 kernel/entry/common.c:354 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:738 RIP: 0010:sched_mm_cid_before_execve+0x397/0x5e0 kernel/sched/core.c:10511 Code: 24 50 48 83 c7 18 e8 68 1e 0b 00 4c 89 ef e8 10 32 fe ff 48 83 7c 24 18 00 0f 85 60 01 00 00 9c 58 f6 c4 02 0f 85 67 01 00 00 <48> b8 00 00 00 00 00 fc ff df 48 8b 74 24 08 48 01 c6 48 c7 06 00 RSP: 0018:ffffc900033d7ad0 EFLAGS: 00000246 RAX: 0000000000000006 RBX: 0000000000000001 RCX: 1ffffffff2dc6e10 RDX: 0000000000000000 RSI: ffffffff8b6cd040 RDI: ffffffff8bd1b2c0 RBP: ffff8880325f08c8 R08: 0000000000000001 R09: fffffbfff2dc5b8a R10: ffffffff96e2dc57 R11: 0000000000000000 R12: 0000607e920727d0 R13: ffff88806a73ee80 R14: ffff888024194880 R15: dffffc0000000000 exit_signals+0x215/0x960 kernel/signal.c:3011 do_exit+0x54e/0x2d70 kernel/exit.c:896 do_group_exit+0xd3/0x2a0 kernel/exit.c:1088 get_signal+0x25fb/0x2770 kernel/signal.c:2917 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x150/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f295497e719 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f295577b038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: 0000000000000007 RBX: 00007f2954b35f80 RCX: 00007f295497e719 RDX: 0000000000000010 RSI: 0000000020000180 RDI: 0000000000000011 RBP: 00007f29549f132e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2954b35f80 R15: 00007fffb90501e8 ---------------- Code disassembly (best guess): 0: 24 50 and $0x50,%al 2: 48 83 c7 18 add $0x18,%rdi 6: e8 68 1e 0b 00 call 0xb1e73 b: 4c 89 ef mov %r13,%rdi e: e8 10 32 fe ff call 0xfffe3223 13: 48 83 7c 24 18 00 cmpq $0x0,0x18(%rsp) 19: 0f 85 60 01 00 00 jne 0x17f 1f: 9c pushf 20: 58 pop %rax 21: f6 c4 02 test $0x2,%ah 24: 0f 85 67 01 00 00 jne 0x191 * 2a: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax <-- trapping instruction 31: fc ff df 34: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 39: 48 01 c6 add %rax,%rsi 3c: 48 rex.W 3d: c7 .byte 0xc7 3e: 06 (bad)