syzbot


KCSAN: data-race in find_group_orlov / percpu_counter_add_batch

Status: auto-closed as invalid on 2020/05/31 22:46
Subsystems: ext4
[Documentation on labels]
First crash: 2126d, last: 1980d

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

write to 0xffff8882186950e0 of 8 bytes by task 25450 on cpu 1:
 percpu_counter_add_batch+0xbc/0x140 lib/percpu_counter.c:91
 percpu_counter_add include/linux/percpu_counter.h:55 [inline]
 percpu_counter_sub include/linux/percpu_counter.h:189 [inline]
 ext4_mb_mark_diskspace_used+0x532/0xa00 fs/ext4/mballoc.c:3010
 ext4_mb_new_blocks+0x714/0x1ea0 fs/ext4/mballoc.c:4560
 ext4_ext_map_blocks+0x1a5c/0x20f0 fs/ext4/extents.c:4440
 ext4_map_blocks+0x230/0xcf0 fs/ext4/inode.c:622
 ext4_alloc_file_blocks+0x22f/0x6f0 fs/ext4/extents.c:4629
 ext4_fallocate+0x9ec/0x2240 fs/ext4/extents.c:4910
 vfs_fallocate+0x3b1/0x650 fs/open.c:309
 ioctl_preallocate+0x12a/0x190 fs/ioctl.c:504
 file_ioctl fs/ioctl.c:544 [inline]
 do_vfs_ioctl+0xa6b/0xd00 fs/ioctl.c:742
 ksys_ioctl+0xb2/0x150 fs/ioctl.c:761
 __do_sys_ioctl fs/ioctl.c:772 [inline]
 __se_sys_ioctl fs/ioctl.c:770 [inline]
 __x64_sys_ioctl+0x47/0x60 fs/ioctl.c:770
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8882186950e0 of 8 bytes by task 7786 on cpu 0:
 find_group_orlov+0x159/0x890 fs/ext4/ialloc.c:441
 __ext4_new_inode+0xb04/0x2f30 fs/ext4/ialloc.c:869
 ext4_mkdir+0x272/0x820 fs/ext4/namei.c:2782
 vfs_mkdir+0x281/0x390 fs/namei.c:3889
 do_mkdirat+0x1b5/0x200 fs/namei.c:3912
 __do_sys_mkdir fs/namei.c:3928 [inline]
 __se_sys_mkdir fs/namei.c:3926 [inline]
 __x64_sys_mkdir+0x3d/0x50 fs/namei.c:3926
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/22 22:46 https://github.com/google/ktsan.git kcsan 40959e34d670 78267cec .config console log report ci2-upstream-kcsan-gce
2020/03/13 19:54 https://github.com/google/ktsan.git kcsan 941e0d917bbf 749688d2 .config console log report ci2-upstream-kcsan-gce
2020/03/01 21:16 https://github.com/google/ktsan.git kcsan 766d004d1b85 4a4e0509 .config console log report ci2-upstream-kcsan-gce
2020/02/25 15:59 https://github.com/google/ktsan.git kcsan 766d004d1b85 4c886d6a .config console log report ci2-upstream-kcsan-gce
2020/02/15 08:32 https://github.com/google/ktsan.git kcsan b12d66a6c34f 5d7b90f1 .config console log report ci2-upstream-kcsan-gce
2020/01/21 19:45 https://github.com/google/ktsan.git kcsan 245a43005292 8eda0b95 .config console log report ci2-upstream-kcsan-gce
2020/01/11 14:06 https://github.com/google/ktsan.git kcsan 245a43005292 4c04afaa .config console log report ci2-upstream-kcsan-gce
2020/01/09 04:42 https://github.com/google/ktsan.git kcsan 245a43005292 ddc3e859 .config console log report ci2-upstream-kcsan-gce
2020/01/05 14:46 https://github.com/google/ktsan.git kcsan 245a43005292 d646e21f .config console log report ci2-upstream-kcsan-gce
2020/01/05 06:07 https://github.com/google/ktsan.git kcsan 245a43005292 68256974 .config console log report ci2-upstream-kcsan-gce
2019/12/17 14:39 https://github.com/google/ktsan.git kcsan 245a43005292 1af3875f .config console log report ci2-upstream-kcsan-gce
2019/12/11 19:29 https://github.com/google/ktsan.git kcsan ef798c30ba4e 0d368675 .config console log report ci2-upstream-kcsan-gce
2019/11/27 14:56 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1048481f .config console log report ci2-upstream-kcsan-gce
2019/11/17 09:42 https://github.com/google/ktsan.git kcsan 5863cc791e4c d5696d51 .config console log report ci2-upstream-kcsan-gce
2019/11/05 07:16 https://github.com/google/ktsan.git kcsan 94c006602e13 76630fc9 .config console log report ci2-upstream-kcsan-gce
2019/10/29 04:40 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.