[v5.15] WARNING: locking bug in percpu_counter_add_batch

0 views
Skip to first unread message

syzbot

unread,
Jan 25, 2026, 11:24:35 PM (17 hours ago) Jan 25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9eec9a14ee10 Linux 5.15.198
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16ca6e8a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link: https://syzkaller.appspot.com/bug?extid=9d6dad554954b838622a
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7146a7b4242e/disk-9eec9a14.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a11468b96c22/vmlinux-9eec9a14.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e7cb8f058e1c/bzImage-9eec9a14.xz

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

------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(!test_bit(class_idx, lock_classes_in_use))
WARNING: CPU: 0 PID: 10729 at kernel/locking/lockdep.c:4982 __lock_acquire+0x5c37/0x7d10 kernel/locking/lockdep.c:4982
Modules linked in:
CPU: 0 PID: 10729 Comm: syz.5.2075 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:__lock_acquire+0x5c37/0x7d10 kernel/locking/lockdep.c:4982
Code: 04 08 84 c0 0f 85 73 1c 00 00 83 3d ca a8 2c 0c 00 0f 85 31 fe ff ff 48 c7 c7 20 26 2b 8a 48 c7 c6 c0 4e 2b 8a e8 c9 95 53 08 <0f> 0b e9 17 fe ff ff 0f 0b e9 26 b7 ff ff c7 44 24 68 00 00 00 00
RSP: 0000:ffffc9000353e700 EFLAGS: 00010046
RAX: c996a49d7a5f7d00 RBX: aaaaaaaaaaaaa1fc RCX: ffff88802bd9bb80
RDX: 0000000000000000 RSI: 0000000080000002 RDI: 0000000000000000
RBP: ffffc9000353e950 R08: ffff8880b902795b R09: 1ffff11017204f2b
R10: dffffc0000000000 R11: ffffed1017204f2c R12: ffff88802bd9c6e0
R13: ffff88802bd9bb80 R14: ffffffff8fb938f8 R15: ffff88802bd9c6c0
FS: 00007f8feb0cd6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffe70 CR3: 000000004880f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
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
percpu_counter_add_batch+0xb1/0x160 lib/percpu_counter.c:90
percpu_counter_add include/linux/percpu_counter.h:56 [inline]
shmem_inode_acct_block mm/shmem.c:224 [inline]
shmem_alloc_and_acct_page+0x2ed/0xbe0 mm/shmem.c:1605
shmem_getpage_gfp+0x14f4/0x2d40 mm/shmem.c:1906
shmem_getpage mm/shmem.c:151 [inline]
shmem_write_begin+0xcd/0x1a0 mm/shmem.c:2474
generic_perform_write+0x2b6/0x550 mm/filemap.c:3785
__generic_file_write_iter+0x25f/0x4e0 mm/filemap.c:3912
generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944
__kernel_write+0x51c/0x970 fs/read_write.c:539
__dump_emit+0x249/0x370 fs/coredump.c:943
dump_user_range+0x84/0x340 fs/coredump.c:1017
elf_core_dump+0x2fbd/0x3500 fs/binfmt_elf.c:2285
do_coredump+0x14c7/0x2ac0 fs/coredump.c:894
get_signal+0x40a/0x12c0 kernel/signal.c:2886
arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:154 [inline]
exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:320
exc_page_fault+0x88/0x100 arch/x86/mm/fault.c:1504
asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606
RIP: 0033:0x7f8fece92cc1
Code: 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 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:fffffffffffffe70 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007f8fed10e090 RCX: 00007f8fece92cb9
RDX: 0000000000000000 RSI: fffffffffffffe70 RDI: 0000000000008000
RBP: 00007f8fecf00bf7 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 00007f8fed10e128 R14: 00007f8fed10e090 R15: 00007fff0c1006a8
</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