================================================================== BUG: KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size write to 0xffff8881013d3918 of 4 bytes by task 2281 on cpu 0: mb_free_blocks+0x323/0xb40 fs/ext4/mballoc.c:1833 ext4_free_blocks+0x1418/0x1b50 fs/ext4/mballoc.c:5988 ext4_remove_blocks+0x61a/0x800 fs/ext4/extents.c:2498 ext4_ext_rm_leaf+0x670/0xd20 fs/ext4/extents.c:2664 ext4_ext_remove_space+0x901/0x1300 fs/ext4/extents.c:2912 ext4_ext_truncate+0xfe/0x170 fs/ext4/extents.c:4370 ext4_truncate+0x76e/0xa80 fs/ext4/inode.c:4262 ext4_setattr+0xacc/0xec0 fs/ext4/inode.c:5504 notify_change+0x8a3/0xa80 fs/attr.c:398 do_truncate+0xe8/0x130 fs/open.c:64 handle_truncate fs/namei.c:3017 [inline] do_open fs/namei.c:3365 [inline] path_openat+0x1a79/0x20b0 fs/namei.c:3494 do_filp_open+0xd9/0x1f0 fs/namei.c:3521 do_sys_openat2+0xa3/0x250 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_creat fs/open.c:1277 [inline] __se_sys_creat fs/open.c:1271 [inline] __x64_sys_creat+0x62/0x80 fs/open.c:1271 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff8881013d3918 of 4 bytes by task 19611 on cpu 1: ext4_mb_avg_fragment_size_cmp fs/ext4/mballoc.c:834 [inline] ext4_mb_rb_insert fs/ext4/mballoc.c:811 [inline] mb_update_avg_fragment_size+0x161/0x260 fs/ext4/mballoc.c:859 mb_mark_used+0xae0/0xc50 fs/ext4/mballoc.c:1993 ext4_mb_use_best_found+0x102/0x320 fs/ext4/mballoc.c:2014 ext4_mb_try_best_found+0x234/0x3d0 fs/ext4/mballoc.c:2180 ext4_mb_regular_allocator+0x22bd/0x2520 fs/ext4/mballoc.c:2778 ext4_mb_new_blocks+0x762/0x1f90 fs/ext4/mballoc.c:5514 ext4_ext_map_blocks+0x1569/0x1f00 fs/ext4/extents.c:4238 ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638 mpage_map_one_extent+0x10d/0x360 fs/ext4/inode.c:2395 mpage_map_and_submit_extent fs/ext4/inode.c:2448 [inline] ext4_writepages+0xc1a/0x1d10 fs/ext4/inode.c:2800 do_writepages+0x7b/0x150 mm/page-writeback.c:2352 __writeback_single_inode+0x80/0x450 fs/fs-writeback.c:1467 writeback_sb_inodes+0x564/0xf10 fs/fs-writeback.c:1732 wb_writeback+0x28e/0x700 fs/fs-writeback.c:1905 wb_do_writeback+0x101/0x510 fs/fs-writeback.c:2050 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2091 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2275 worker_thread+0x636/0xae0 kernel/workqueue.c:2421 kthread+0x1d0/0x1f0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19611 Comm: kworker/u4:1 Tainted: G W 5.13.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) ================================================================== EXT4-fs (sda1): Delayed block allocation failed for inode 15505 at logical offset 361 with max blocks 1 with error 28 EXT4-fs (sda1): This should not happen!! Data will be lost