[v6.1] possible deadlock in get_page_from_freelist (3)

0 views
Skip to first unread message

syzbot

unread,
Jan 13, 2026, 5:48:33 PM (2 days ago) Jan 13
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bec0e10ee67e Linux 6.1.160
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15f80522580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6a5cbd268406bf43
dashboard link: https://syzkaller.appspot.com/bug?extid=cdf761f82f0238732c3e
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eef10a13b127/disk-bec0e10e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/75d8309ba559/vmlinux-bec0e10e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/59339d7672d2/bzImage-bec0e10e.xz

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

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.212/5153 is trying to acquire lock:
ffff88813fffacd8 (&zone->lock){-.-.}-{2:2}, at: rmqueue_buddy mm/page_alloc.c:3724 [inline]
ffff88813fffacd8 (&zone->lock){-.-.}-{2:2}, at: rmqueue mm/page_alloc.c:3877 [inline]
ffff88813fffacd8 (&zone->lock){-.-.}-{2:2}, at: get_page_from_freelist+0x912/0x1ac0 mm/page_alloc.c:4325

but task is already holding lock:
ffff8880742a4238 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xc4/0xe90 kernel/bpf/lpm_trie.c:335

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&trie->lock){....}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
trie_delete_elem+0x90/0x690 kernel/bpf/lpm_trie.c:467
0xffffffffa0001fb1
bpf_dispatcher_nop_func include/linux/bpf.h:1012 [inline]
__bpf_prog_run include/linux/filter.h:607 [inline]
bpf_prog_run include/linux/filter.h:614 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline]
bpf_trace_run5+0x211/0x440 kernel/trace/bpf_trace.c:2327
__bpf_trace_mm_page_alloc_extfrag+0xe9/0x110 include/trace/events/kmem.h:266
trace_mm_page_alloc_extfrag+0x168/0x1b0 include/trace/events/kmem.h:266
__rmqueue_fallback mm/page_alloc.c:3075 [inline]
__rmqueue mm/page_alloc.c:3112 [inline]
rmqueue_bulk mm/page_alloc.c:3133 [inline]
__rmqueue_pcplist+0x786/0xfb0 mm/page_alloc.c:3785
rmqueue_pcplist mm/page_alloc.c:3827 [inline]
rmqueue mm/page_alloc.c:3870 [inline]
get_page_from_freelist+0x7cd/0x1ac0 mm/page_alloc.c:4325
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc_node+0xa0/0x240 mm/slab_common.c:943
kmalloc_node include/linux/slab.h:589 [inline]
kvmalloc_node+0x6c/0x180 mm/util.c:581
kvmalloc include/linux/slab.h:716 [inline]
kvmalloc_array include/linux/slab.h:734 [inline]
__ptr_ring_init_queue_alloc include/linux/ptr_ring.h:471 [inline]
ptr_ring_init include/linux/ptr_ring.h:489 [inline]
skb_array_init include/linux/skb_array.h:182 [inline]
pfifo_fast_init+0x109/0x6a0 net/sched/sch_generic.c:870
qdisc_create_dflt+0x11a/0x4b0 net/sched/sch_generic.c:1019
mq_init+0x2df/0x660 net/sched/sch_mq.c:90
qdisc_create_dflt+0x11a/0x4b0 net/sched/sch_generic.c:1019
attach_default_qdiscs net/sched/sch_generic.c:1199 [inline]
dev_activate+0x1cc/0x11a0 net/sched/sch_generic.c:1253
__dev_open+0x334/0x420 net/core/dev.c:1497
__dev_change_flags+0x20a/0x6a0 net/core/dev.c:8638
dev_change_flags+0x82/0x1a0 net/core/dev.c:8709
dev_ifsioc+0x12a/0xcd0 net/core/dev_ioctl.c:326
dev_ioctl+0x55e/0xe80 net/core/dev_ioctl.c:572
sock_do_ioctl+0x222/0x2f0 net/socket.c:1215
sock_ioctl+0x4df/0x6d0 net/socket.c:1320
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&zone->lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain kernel/locking/lockdep.c:3825 [inline]
__lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049
lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
rmqueue_buddy mm/page_alloc.c:3724 [inline]
rmqueue mm/page_alloc.c:3877 [inline]
get_page_from_freelist+0x912/0x1ac0 mm/page_alloc.c:4325
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
__alloc_pages_node include/linux/gfp.h:237 [inline]
alloc_pages_node include/linux/gfp.h:260 [inline]
__kmalloc_large_node+0x8c/0x1e0 mm/slab_common.c:1077
__do_kmalloc_node mm/slab_common.c:924 [inline]
__kmalloc_node+0x10e/0x240 mm/slab_common.c:943
kmalloc_node include/linux/slab.h:589 [inline]
bpf_map_kmalloc_node+0xb8/0x1a0 kernel/bpf/syscall.c:454
lpm_trie_node_alloc kernel/bpf/lpm_trie.c:291 [inline]
trie_update_elem+0x160/0xe90 kernel/bpf/lpm_trie.c:338
bpf_map_update_value+0x59e/0x670 kernel/bpf/syscall.c:228
map_update_elem+0x4d7/0x680 kernel/bpf/syscall.c:1473
__sys_bpf+0x454/0x6d0 kernel/bpf/syscall.c:5018
__do_sys_bpf kernel/bpf/syscall.c:5134 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5132 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5132
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&trie->lock);
lock(&zone->lock);
lock(&trie->lock);
lock(&zone->lock);

*** DEADLOCK ***

2 locks held by syz.0.212/5153:
#0: ffffffff8c92b1e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8c92b1e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8c92b1e0 (rcu_read_lock){....}-{1:2}, at: bpf_map_update_value+0x375/0x670 kernel/bpf/syscall.c:227
#1: ffff8880742a4238 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xc4/0xe90 kernel/bpf/lpm_trie.c:335

stack backtrace:
CPU: 1 PID: 5153 Comm: syz.0.212 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain kernel/locking/lockdep.c:3825 [inline]
__lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049
lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
rmqueue_buddy mm/page_alloc.c:3724 [inline]
rmqueue mm/page_alloc.c:3877 [inline]
get_page_from_freelist+0x912/0x1ac0 mm/page_alloc.c:4325
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
__alloc_pages_node include/linux/gfp.h:237 [inline]
alloc_pages_node include/linux/gfp.h:260 [inline]
__kmalloc_large_node+0x8c/0x1e0 mm/slab_common.c:1077
__do_kmalloc_node mm/slab_common.c:924 [inline]
__kmalloc_node+0x10e/0x240 mm/slab_common.c:943
kmalloc_node include/linux/slab.h:589 [inline]
bpf_map_kmalloc_node+0xb8/0x1a0 kernel/bpf/syscall.c:454
lpm_trie_node_alloc kernel/bpf/lpm_trie.c:291 [inline]
trie_update_elem+0x160/0xe90 kernel/bpf/lpm_trie.c:338
bpf_map_update_value+0x59e/0x670 kernel/bpf/syscall.c:228
map_update_elem+0x4d7/0x680 kernel/bpf/syscall.c:1473
__sys_bpf+0x454/0x6d0 kernel/bpf/syscall.c:5018
__do_sys_bpf kernel/bpf/syscall.c:5134 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5132 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5132
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5a74b8f749
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:00007f5a75a8b038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f5a74de5fa0 RCX: 00007f5a74b8f749
RDX: 0000000000000020 RSI: 0000200000000080 RDI: 0000000000000002
RBP: 00007f5a74c13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5a74de6038 R14: 00007f5a74de5fa0 R15: 00007ffdccde0b68
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages