============================================ WARNING: possible recursive locking detected 6.1.90-syzkaller #0 Not tainted -------------------------------------------- syz-fuzzer/3556 is trying to acquire lock: ffffc900033210d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 but task is already holding lock: ffffc900033a50d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 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 4 locks held by syz-fuzzer/3556: #0: ffff8880794ee468 (&ep->mtx){+.+.}-{3:3}, at: ep_send_events fs/eventpoll.c:1657 [inline] #0: ffff8880794ee468 (&ep->mtx){+.+.}-{3:3}, at: ep_poll fs/eventpoll.c:1827 [inline] #0: ffff8880794ee468 (&ep->mtx){+.+.}-{3:3}, at: do_epoll_wait+0x814/0x1e60 fs/eventpoll.c:2262 #1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #1: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 #2: ffffc900033a50d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 1 PID: 3556 Comm: syz-fuzzer Not tainted 6.1.90-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 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 __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:445 [inline] bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:437 bpf_prog_8c296d0debb99b26+0x25/0x42 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 __traceiter_contention_end+0x74/0xa0 include/trace/events/lock.h:122 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 __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:445 [inline] bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:437 bpf_prog_8c296d0debb99b26+0x25/0x42 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 __traceiter_contention_end+0x74/0xa0 include/trace/events/lock.h:122 trace_contention_end+0x12f/0x170 include/trace/events/lock.h:122 __mutex_lock_common kernel/locking/mutex.c:612 [inline] __mutex_lock+0x2ed/0xd80 kernel/locking/mutex.c:747 ep_send_events fs/eventpoll.c:1657 [inline] ep_poll fs/eventpoll.c:1827 [inline] do_epoll_wait+0x814/0x1e60 fs/eventpoll.c:2262 do_epoll_pwait+0x56/0x1d0 fs/eventpoll.c:2296 __do_sys_epoll_pwait fs/eventpoll.c:2309 [inline] __se_sys_epoll_pwait fs/eventpoll.c:2303 [inline] __x64_sys_epoll_pwait+0x2b4/0x300 fs/eventpoll.c:2303 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x40720e Code: 48 83 ec 38 e8 13 00 00 00 48 83 c4 38 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc cc 49 89 f2 48 89 fa 48 89 ce 48 89 df 0f 05 <48> 3d 01 f0 ff ff 76 15 48 f7 d8 48 89 c1 48 c7 c0 ff ff ff ff 48 RSP: 002b:000000c00078b748 EFLAGS: 00000246 ORIG_RAX: 0000000000000119 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000040720e RDX: 0000000000000080 RSI: 000000c00078b818 RDI: 0000000000000004 RBP: 000000c00078b790 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000c00078b820 R13: 000000c000257000 R14: 000000c0007a8b60 R15: 0000000000000132