syzbot


KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch

Status: auto-closed as invalid on 2020/04/07 10:35
Subsystems: mm
[Documentation on labels]
First crash: 1995d, last: 1995d
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch (2) mm 6 1 1816d 1816d 0/29 auto-closed as invalid on 2020/08/29 01:07
upstream KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch (3) mm 6 108 1354d 1681d 0/29 auto-closed as invalid on 2021/12/04 05:37
upstream KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch (4) mm 6 75 814d 1314d 0/29 auto-obsoleted due to no activity on 2023/05/28 04:22
upstream KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch (5) mm 6 30 620d 584d 0/29 auto-obsoleted due to no activity on 2023/12/23 00:07

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

write to 0xffff8880a7865a10 of 8 bytes by task 9124 on cpu 1:
 percpu_counter_add_batch+0xca/0x150 lib/percpu_counter.c:91
 percpu_counter_add include/linux/percpu_counter.h:55 [inline]
 shmem_inode_acct_block mm/shmem.c:227 [inline]
 shmem_alloc_and_acct_page+0x3f5/0x450 mm/shmem.c:1518
 shmem_getpage_gfp+0x2f2/0x1390 mm/shmem.c:1838
 shmem_getpage mm/shmem.c:154 [inline]
 shmem_write_begin+0x9f/0x140 mm/shmem.c:2487
 generic_perform_write+0x136/0x320 mm/filemap.c:3309
 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3438
 generic_file_write_iter+0x28c/0x38c mm/filemap.c:3470
 call_write_iter include/linux/fs.h:1902 [inline]
 new_sync_write+0x388/0x4a0 fs/read_write.c:483
 __vfs_write+0xb1/0xc0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0xd5/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880a7865a10 of 8 bytes by task 9120 on cpu 0:
 __percpu_counter_compare+0x40/0x110 lib/percpu_counter.c:206
 percpu_counter_compare include/linux/percpu_counter.h:50 [inline]
 shmem_inode_acct_block mm/shmem.c:224 [inline]
 shmem_alloc_and_acct_page+0x36d/0x450 mm/shmem.c:1518
 shmem_getpage_gfp+0x2f2/0x1390 mm/shmem.c:1838
 shmem_getpage mm/shmem.c:154 [inline]
 shmem_write_begin+0x9f/0x140 mm/shmem.c:2487
 generic_perform_write+0x136/0x320 mm/filemap.c:3309
 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3438
 generic_file_write_iter+0x28c/0x38c mm/filemap.c:3470
 call_write_iter include/linux/fs.h:1902 [inline]
 new_sync_write+0x388/0x4a0 fs/read_write.c:483
 __vfs_write+0xb1/0xc0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0xd5/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9120 Comm: syz-executor.1 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/28 10:34 https://github.com/google/ktsan.git kcsan 245a43005292 56cd6c9b .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.