syzbot


upstream test error: KCSAN: data-race in __percpu_counter_limited_add / __percpu_counter_limited_add

Status: moderation: reported on 2024/08/19 06:21
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+be1275ceca3c8cba5965@syzkaller.appspotmail.com
First crash: 24d, last: 24d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __percpu_counter_limited_add / __percpu_counter_limited_add

write to 0xffff8881085e5910 of 8 bytes by task 3713 on cpu 1:
 __percpu_counter_limited_add+0x3df/0x450 lib/percpu_counter.c:386
 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:1814 [inline]
 shmem_get_folio_gfp+0x5e2/0xd80 mm/shmem.c:2188
 shmem_get_folio mm/shmem.c:2293 [inline]
 shmem_write_begin+0xa0/0x1c0 mm/shmem.c:2898
 generic_perform_write+0x1b4/0x580 mm/filemap.c:4019
 shmem_file_write_iter+0xc8/0xf0 mm/shmem.c:3074
 __kernel_write_iter+0x24f/0x4e0 fs/read_write.c:523
 dump_emit_page fs/coredump.c:893 [inline]
 dump_user_range+0x3a7/0x550 fs/coredump.c:954
 elf_core_dump+0x1aeb/0x1c30 fs/binfmt_elf.c:2116
 do_coredump+0xfa7/0x1810 fs/coredump.c:767
 get_signal+0xdc1/0x1080 kernel/signal.c:2902
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 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
 exc_general_protection+0x33d/0x4d0 arch/x86/kernel/traps.c:644
 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617

read to 0xffff8881085e5910 of 8 bytes by task 3649 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:1814 [inline]
 shmem_get_folio_gfp+0x5e2/0xd80 mm/shmem.c:2188
 shmem_get_folio mm/shmem.c:2293 [inline]
 shmem_write_begin+0xa0/0x1c0 mm/shmem.c:2898
 generic_perform_write+0x1b4/0x580 mm/filemap.c:4019
 shmem_file_write_iter+0xc8/0xf0 mm/shmem.c:3074
 __kernel_write_iter+0x24f/0x4e0 fs/read_write.c:523
 dump_emit_page fs/coredump.c:893 [inline]
 dump_user_range+0x3a7/0x550 fs/coredump.c:954
 elf_core_dump+0x1aeb/0x1c30 fs/binfmt_elf.c:2116
 do_coredump+0xfa7/0x1810 fs/coredump.c:767
 get_signal+0xdc1/0x1080 kernel/signal.c:2902
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 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

value changed: 0x00000000000034da -> 0x00000000000034fb

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3649 Comm: syz.4.378 Not tainted 6.11.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================
syz.4.378 (3649) used greatest stack depth: 10520 bytes left

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/19 06:20 upstream 47ac09b91bef dbc93b08 .config console log report [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce upstream test error: KCSAN: data-race in __percpu_counter_limited_add / __percpu_counter_limited_add
* Struck through repros no longer work on HEAD.