================================================================== BUG: KCSAN: data-race in mb_mark_used / mb_update_avg_fragment_size write to 0xffff888101781b54 of 4 bytes by task 1783 on cpu 0: mb_mark_used+0x13b/0xc50 fs/ext4/mballoc.c:1943 ext4_mb_use_best_found+0x102/0x320 fs/ext4/mballoc.c:2015 ext4_mb_measure_extent fs/ext4/mballoc.c:2131 [inline] ext4_mb_complex_scan_group+0x349/0x850 fs/ext4/mballoc.c:2361 ext4_mb_regular_allocator+0x1a22/0x2520 fs/ext4/mballoc.c:2760 ext4_mb_new_blocks+0x762/0x1f90 fs/ext4/mballoc.c:5515 ext4_ext_map_blocks+0x1569/0x1f00 fs/ext4/extents.c:4245 ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638 ext4_getblk+0xb1/0x3d0 fs/ext4/inode.c:848 ext4_bread+0x28/0x100 fs/ext4/inode.c:900 ext4_append+0xd1/0x1c0 fs/ext4/namei.c:67 ext4_init_new_dir+0x177/0x500 fs/ext4/namei.c:2885 ext4_mkdir+0x329/0x760 fs/ext4/namei.c:2931 vfs_mkdir+0x2a4/0x370 fs/namei.c:3823 do_mkdirat+0x11d/0x200 fs/namei.c:3848 __do_sys_mkdir fs/namei.c:3866 [inline] __se_sys_mkdir fs/namei.c:3864 [inline] __x64_sys_mkdir+0x32/0x40 fs/namei.c:3864 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff888101781b54 of 4 bytes by task 5127 on cpu 1: ext4_mb_avg_fragment_size_cmp fs/ext4/mballoc.c:835 [inline] ext4_mb_rb_insert fs/ext4/mballoc.c:811 [inline] mb_update_avg_fragment_size+0x184/0x260 fs/ext4/mballoc.c:859 mb_mark_used+0xae0/0xc50 fs/ext4/mballoc.c:1994 ext4_mb_use_best_found+0x102/0x320 fs/ext4/mballoc.c:2015 ext4_mb_simple_scan_group+0x253/0x3a0 fs/ext4/mballoc.c:2293 ext4_mb_regular_allocator+0x1974/0x2520 fs/ext4/mballoc.c:2755 ext4_mb_new_blocks+0x762/0x1f90 fs/ext4/mballoc.c:5515 ext4_ext_map_blocks+0x1569/0x1f00 fs/ext4/extents.c:4245 ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638 ext4_iomap_alloc fs/ext4/inode.c:3426 [inline] ext4_iomap_begin+0x4a0/0x620 fs/ext4/inode.c:3476 iomap_apply+0x8d/0x400 fs/iomap/apply.c:46 __iomap_dio_rw+0x62e/0xa60 fs/iomap/direct-io.c:561 iomap_dio_rw+0x30/0x70 fs/iomap/direct-io.c:649 ext4_dio_write_iter fs/ext4/file.c:568 [inline] ext4_file_write_iter+0xa4f/0x11d0 fs/ext4/file.c:678 call_write_iter include/linux/fs.h:2114 [inline] aio_write+0x287/0x360 fs/aio.c:1578 __io_submit_one fs/aio.c:1837 [inline] io_submit_one+0x82f/0x1350 fs/aio.c:1880 __do_sys_io_submit fs/aio.c:1939 [inline] __se_sys_io_submit+0xf5/0x260 fs/aio.c:1909 __x64_sys_io_submit+0x3f/0x50 fs/aio.c:1909 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x0000594a -> 0x00005949 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 5127 Comm: syz-executor.5 Not tainted 5.14.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== syz-executor.5 (5127) used greatest stack depth: 10096 bytes left