syzbot


possible deadlock in __bpf_ringbuf_reserve (2)

Status: upstream: reported C repro on 2026/05/31 03:49
Reported-by: syzbot+479dd17882eeaafdb2b5@syzkaller.appspotmail.com
First crash: 5d07h, last: 5d07h
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in __bpf_ringbuf_reserve origin:upstream missing-backport 4 C inconclusive 91 135d 818d 0/3 upstream: reported C repro on 2024/03/08 23:13
upstream possible deadlock in __bpf_ringbuf_reserve (2) bpf 4 C done error 22 268d 283d 0/29 auto-obsoleted due to no activity on 2025/11/18 12:07
linux-5.15 possible deadlock in __bpf_ringbuf_reserve 4 1 273d 273d 0/3 auto-obsoleted due to no activity on 2025/12/13 22:27
linux-6.6 possible deadlock in __bpf_ringbuf_reserve origin:lts-only 4 C inconclusive 36 135d 336d 0/2 upstream: reported C repro on 2025/07/04 03:51
upstream possible deadlock in __bpf_ringbuf_reserve bpf 4 C error 2490 410d 814d 28/29 fixed on 2025/06/10 16:19

Sample crash report:
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.17/4334 is trying to acquire lock:
ffffc90001216098 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1db/0x5a0 kernel/bpf/ringbuf.c:330

but task is already holding lock:
ffffc90002ea1098 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1db/0x5a0 kernel/bpf/ringbuf.c:330

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

3 locks held by syz.0.17/4334:
 #0: ffffffff8c31f320 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x9/0x30 include/linux/rcupdate.h:313
 #1: ffffc90002ea1098 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1db/0x5a0 kernel/bpf/ringbuf.c:330
 #2: ffffffff8c31f320 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312

stack backtrace:
CPU: 0 PID: 4334 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 __lock_acquire+0x1236/0x7d10 kernel/locking/lockdep.c:-1
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xb0/0x100 kernel/locking/spinlock.c:162
 __bpf_ringbuf_reserve+0x1db/0x5a0 kernel/bpf/ringbuf.c:330
 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:381 [inline]
 bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:373
 bpf_prog_80ea4633ad9a84fe+0x2d/0x9d4
 bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline]
 __bpf_prog_run include/linux/filter.h:628 [inline]
 bpf_prog_run include/linux/filter.h:635 [inline]
 BPF_PROG_RUN_ARRAY include/linux/bpf.h:1439 [inline]
 trace_call_bpf+0x2b1/0x5b0 kernel/trace/bpf_trace.c:127
 perf_trace_run_bpf_submit+0x79/0x1c0 kernel/events/core.c:10016
 perf_trace_lock+0x301/0x390 include/trace/events/lock.h:39
 trace_lock_release include/trace/events/lock.h:58 [inline]
 lock_release+0x84a/0x8a0 kernel/locking/lockdep.c:5634
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:158 [inline]
 _raw_spin_unlock_irqrestore+0x6d/0x120 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:419 [inline]
 __bpf_ringbuf_reserve+0x45e/0x5a0 kernel/bpf/ringbuf.c:368
 ____bpf_ringbuf_output kernel/bpf/ringbuf.c:456 [inline]
 bpf_ringbuf_output+0x65/0x1e0 kernel/bpf/ringbuf.c:446
 bpf_prog_c74688a29e5e6c87+0x3f/0x520
 bpf_dispatcher_nop_func include/linux/bpf.h:888 [inline]
 __bpf_prog_run include/linux/filter.h:628 [inline]
 bpf_prog_run include/linux/filter.h:635 [inline]
 bpf_test_run+0x2a8/0x800 net/bpf/test_run.c:119
 bpf_prog_test_run_skb+0x9cc/0x1180 net/bpf/test_run.c:674
 bpf_prog_test_run+0x31e/0x390 kernel/bpf/syscall.c:3374
 __sys_bpf+0x5a5/0x6f0 kernel/bpf/syscall.c:4675
 __do_sys_bpf kernel/bpf/syscall.c:4761 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4759 [inline]
 __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4759
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fd13e50be59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc31e92098 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fd13e784fa0 RCX: 00007fd13e50be59
RDX: 0000000000000050 RSI: 00002000000004c0 RDI: 000000000000000a
RBP: 00007fd13e5a1d6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd13e784fac R14: 00007fd13e784fa0 R15: 00007fd13e784fa0
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/31 04:24 linux-5.15.y 241d66fa280c 6b4a8443 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2026/05/31 03:48 linux-5.15.y 241d66fa280c 6b4a8443 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-perf possible deadlock in __bpf_ringbuf_reserve
* Struck through repros no longer work on HEAD.