================================================================== BUG: KCSAN: data-race in ext4_has_free_clusters / percpu_counter_add_batch write to 0xffff88821866d8e0 of 8 bytes by task 7382 on cpu 1: percpu_counter_add_batch+0xca/0x150 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+0x465/0x740 fs/ext4/mballoc.c:3010 ext4_mb_new_blocks+0x6fb/0x1ca0 fs/ext4/mballoc.c:4556 ext4_ext_map_blocks+0x1c1e/0x2330 fs/ext4/extents.c:4414 ext4_map_blocks+0x244/0xf70 fs/ext4/inode.c:640 mpage_map_one_extent fs/ext4/inode.c:2496 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2545 [inline] ext4_writepages+0x1392/0x22e0 fs/ext4/inode.c:2897 do_writepages+0x6b/0x170 mm/page-writeback.c:2342 __writeback_single_inode+0xaf/0x8d0 fs/fs-writeback.c:1364 writeback_sb_inodes+0x4ba/0xa50 fs/fs-writeback.c:1628 __writeback_inodes_wb+0xe8/0x1b0 fs/fs-writeback.c:1697 wb_writeback+0x557/0x6a0 fs/fs-writeback.c:1806 wb_check_background_flush fs/fs-writeback.c:1874 [inline] wb_do_writeback fs/fs-writeback.c:1962 [inline] wb_workfn+0x697/0x950 fs/fs-writeback.c:1990 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 worker_thread+0xa0/0x800 kernel/workqueue.c:2415 read to 0xffff88821866d8e0 of 8 bytes by task 7675 on cpu 0: ext4_has_free_clusters+0x44/0x320 fs/ext4/balloc.c:554 ext4_claim_free_clusters+0x2e/0x90 fs/ext4/balloc.c:598 ext4_da_reserve_space+0x102/0x280 fs/ext4/inode.c:1602 ext4_insert_delayed_block fs/ext4/inode.c:1813 [inline] ext4_da_map_blocks fs/ext4/inode.c:1928 [inline] ext4_da_get_block_prep+0x87d/0xa60 fs/ext4/inode.c:1992 ext4_block_write_begin+0x33e/0xb90 fs/ext4/inode.c:1202 ext4_da_write_begin+0x1da/0x7e0 fs/ext4/inode.c:3122 generic_perform_write+0x136/0x320 mm/filemap.c:3327 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3456 ext4_file_write_iter+0x1fc/0xa40 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1870 [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 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 7675 Comm: syz-executor.4 Not tainted 5.3.0+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================