================================================================== BUG: KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks write to 0xffff8881017f6b54 of 4 bytes by task 27055 on cpu 0: mb_free_blocks+0x156/0xb40 fs/ext4/mballoc.c:1798 ext4_free_blocks+0x1418/0x1b50 fs/ext4/mballoc.c:5989 ext4_remove_blocks+0x61a/0x800 fs/ext4/extents.c:2502 ext4_ext_rm_leaf+0x670/0xd20 fs/ext4/extents.c:2668 ext4_ext_remove_space+0x901/0x1300 fs/ext4/extents.c:2916 ext4_ext_truncate+0xfe/0x170 fs/ext4/extents.c:4377 ext4_truncate+0x76e/0xa80 fs/ext4/inode.c:4262 ext4_truncate_failed_write fs/ext4/truncate.h:20 [inline] ext4_handle_inode_extension fs/ext4/file.c:358 [inline] ext4_dio_write_iter fs/ext4/file.c:574 [inline] ext4_file_write_iter+0x106c/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 read to 0xffff8881017f6b54 of 4 bytes by task 886 on cpu 1: ext4_mb_find_by_goal+0x129/0x890 fs/ext4/mballoc.c:2203 ext4_mb_regular_allocator+0x11c/0x2520 fs/ext4/mballoc.c:2636 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 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:2355 __writeback_single_inode+0x80/0x440 fs/fs-writeback.c:1613 writeback_sb_inodes+0x563/0xd10 fs/fs-writeback.c:1878 wb_writeback+0x28e/0x700 fs/fs-writeback.c:2051 wb_do_writeback+0x101/0x510 fs/fs-writeback.c:2196 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2237 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276 worker_thread+0x636/0xae0 kernel/workqueue.c:2422 kthread+0x262/0x280 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 value changed: 0x000000d1 -> 0x000000d6 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 886 Comm: kworker/u4:3 Not tainted 5.14.0-rc5-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: 54 callbacks suppressed EXT4-fs (sda1): Delayed block allocation failed for inode 15750 at logical offset 1171 with max blocks 75 with error 28 EXT4-fs (sda1): This should not happen!! Data will be lost EXT4-fs (sda1): Total free blocks count 17899 EXT4-fs (sda1): Free/Dirty block details EXT4-fs (sda1): free_blocks=257937 EXT4-fs (sda1): dirty_blocks=6484 EXT4-fs (sda1): Block reservation details EXT4-fs (sda1): i_reserved_data_blocks=75 EXT4-fs (sda1): Delayed block allocation failed for inode 15750 at logical offset 1607 with max blocks 4 with error 28 EXT4-fs (sda1): This should not happen!! Data will be lost EXT4-fs (sda1): Delayed block allocation failed for inode 16367 at logical offset 1620 with max blocks 12 with error 28 EXT4-fs (sda1): This should not happen!! Data will be lost