[moderation] [mm?] KCSAN: data-race in __percpu_counter_limited_add / percpu_counter_add_batch (2)

1 view
Skip to first unread message

syzbot

unread,
Oct 27, 2024, 11:58:26 PM10/27/24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 284a2f899676 Merge tag 'platform-drivers-x86-v6.12-3' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12c17e5f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=1ac60661f96136b0
dashboard link: https://syzkaller.appspot.com/bug?extid=7e125305db4a27caacd1
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org hu...@google.com linux-...@vger.kernel.org linu...@kvack.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6f72ed9c8e4d/disk-284a2f89.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6d30a926a238/vmlinux-284a2f89.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d83a2f0cdafd/bzImage-284a2f89.xz

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

==================================================================
BUG: KCSAN: data-race in __percpu_counter_limited_add / percpu_counter_add_batch

read-write to 0xffff888114dba490 of 8 bytes by task 9541 on cpu 1:
percpu_counter_add_batch+0x120/0x140 lib/percpu_counter.c:107
percpu_counter_add include/linux/percpu_counter.h:71 [inline]
percpu_counter_sub include/linux/percpu_counter.h:277 [inline]
shmem_inode_unacct_blocks mm/shmem.c:259 [inline]
shmem_recalc_inode+0x130/0x1b0 mm/shmem.c:456
shmem_undo_range+0xa3d/0xa70 mm/shmem.c:1139
shmem_truncate_range mm/shmem.c:1144 [inline]
shmem_evict_inode+0x14d/0x530 mm/shmem.c:1272
evict+0x2f0/0x580 fs/inode.c:725
iput_final fs/inode.c:1877 [inline]
iput+0x42a/0x5b0 fs/inode.c:1903
dentry_unlink_inode+0x24f/0x260 fs/dcache.c:412
__dentry_kill+0x18b/0x4c0 fs/dcache.c:615
dput+0x5c/0xd0 fs/dcache.c:857
__fput+0x3fb/0x6d0 fs/file_table.c:439
____fput+0x1c/0x30 fs/file_table.c:459
task_work_run+0x13a/0x1a0 kernel/task_work.c:239
exit_task_work include/linux/task_work.h:43 [inline]
do_exit+0x5dd/0x17f0 kernel/exit.c:939
do_group_exit+0x102/0x150 kernel/exit.c:1088
get_signal+0xf2a/0x1070 kernel/signal.c:2917
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
irqentry_exit_to_user_mode+0x9a/0x130 kernel/entry/common.c:231
irqentry_exit+0x12/0x50 kernel/entry/common.c:334
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffff888114dba490 of 8 bytes by task 9575 on cpu 0:
__percpu_counter_limited_add+0xfa/0x450
percpu_counter_limited_add include/linux/percpu_counter.h:77 [inline]
shmem_inode_acct_blocks+0xf5/0x230 mm/shmem.c:228
shmem_alloc_and_add_folio mm/shmem.c:1838 [inline]
shmem_get_folio_gfp+0x5be/0xd90 mm/shmem.c:2330
shmem_get_folio mm/shmem.c:2436 [inline]
shmem_fallocate+0x593/0x860 mm/shmem.c:3477
vfs_fallocate+0x368/0x3b0 fs/open.c:333
ksys_fallocate fs/open.c:356 [inline]
__do_sys_fallocate fs/open.c:364 [inline]
__se_sys_fallocate fs/open.c:362 [inline]
__x64_sys_fallocate+0x79/0xc0 fs/open.c:362
x64_sys_call+0x2783/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:286
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000005756 -> 0x0000000000001e25

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 9575 Comm: syz.4.1563 Not tainted 6.12.0-rc4-syzkaller-00281-g284a2f899676 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================


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

syzbot

unread,
Dec 22, 2024, 10:58:12 PM12/22/24
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages