================================================================== BUG: KCSAN: data-race in ext4_has_free_clusters / percpu_counter_add_batch write to 0xffff88812a0688e0 of 8 bytes by task 8327 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 mpage_map_one_extent fs/ext4/inode.c:2365 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2418 [inline] ext4_writepages+0x108b/0x1d40 fs/ext4/inode.c:2772 do_writepages+0x6b/0x170 mm/page-writeback.c:2344 __filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421 __filemap_fdatawrite mm/filemap.c:429 [inline] filemap_flush+0x2a/0x40 mm/filemap.c:456 ext4_alloc_da_blocks+0x72/0x170 fs/ext4/inode.c:3146 ext4_release_file+0x107/0x200 fs/ext4/file.c:142 __fput+0x1c3/0x4f0 fs/file_table.c:280 ____fput+0x1b/0x30 fs/file_table.c:313 task_work_run+0xf5/0x130 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x2ae/0x2c0 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_64+0x36e/0x390 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffff88812a0688e0 of 8 bytes by task 8321 on cpu 0: ext4_has_free_clusters+0x44/0x310 fs/ext4/balloc.c:557 ext4_claim_free_clusters+0x2c/0x80 fs/ext4/balloc.c:601 ext4_da_reserve_space+0xf8/0x270 fs/ext4/inode.c:1464 ext4_insert_delayed_block fs/ext4/inode.c:1632 [inline] ext4_da_map_blocks fs/ext4/inode.c:1747 [inline] ext4_da_get_block_prep+0x87e/0xa50 fs/ext4/inode.c:1811 ext4_block_write_begin+0x336/0xbd0 fs/ext4/inode.c:1054 ext4_da_write_begin+0x220/0x860 fs/ext4/inode.c:2997 generic_perform_write+0x13a/0x320 mm/filemap.c:3287 ext4_buffered_write_iter+0x14e/0x280 fs/ext4/file.c:270 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x303/0x400 fs/read_write.c:483 __vfs_write+0x9e/0xb0 fs/read_write.c:496 vfs_write fs/read_write.c:558 [inline] vfs_write+0x189/0x380 fs/read_write.c:542 ksys_write+0xc5/0x1a0 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x49/0x60 fs/read_write.c:620 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: 8321 Comm: syz-executor.3 Not tainted 5.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================