Thread (5 messages) flat view 5 messages, 3 authors, 2025-09-01

Re: [syzbot] [bpf?] possible deadlock in __bpf_ringbuf_reserve (2)

From: Leon Hwang <hidden>
Date: 2025-08-26 02:30:21
Also in: bpf, lkml


On 26/8/25 10:23, Alexei Starovoitov wrote:
On Mon, Aug 25, 2025 at 7:20 PM Leon Hwang [off-list ref] wrote:
quoted


On 26/8/25 01:39, syzbot wrote:
quoted
Hello,

syzbot found the following issue on:

HEAD commit:    dd9de524183a xsk: Fix immature cq descriptor production
git tree:       bpf
console output: https://syzkaller.appspot.com/x/log.txt?x=102da862580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=c321f33e4545e2a1
dashboard link: https://syzkaller.appspot.com/bug?extid=fa5c2814795b5adca240
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=142da862580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1588aef0580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5a3389c1558f/disk-dd9de524.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c97133192a27/vmlinux-dd9de524.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3ae5a1a88637/bzImage-dd9de524.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fa5c2814795b5adca240@syzkaller.appspotmail.com

============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz-execprog/5866 is trying to acquire lock:
ffffc900048c10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1c7/0x5a0 kernel/bpf/ringbuf.c:423

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

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
Confirmed.

I can reproduce this deadlock issue and will work on a fix.
Don't.

It's due to revert.
Once rqspinlock is fixed the revert will be reverted.
OK. I'll test it after the fixing.

Thanks,
Leon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help