================================================================== BUG: KCSAN: data-race in ext4_nonda_switch / percpu_counter_add_batch read to 0xffff8881264130e0 of 8 bytes by task 16524 on cpu 0: ext4_nonda_switch+0x3d/0x140 fs/ext4/inode.c:2988 ext4_da_write_begin+0xc5/0x7e0 fs/ext4/inode.c:3036 generic_perform_write+0x136/0x320 mm/filemap.c:3304 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3433 ext4_file_write_iter+0x1bd/0xa00 fs/ext4/file.c:268 call_write_iter include/linux/fs.h:1895 [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 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x4c/0x60 fs/read_write.c:620 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffff8881264130e0 of 8 bytes by task 23 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+0x525/0x9d0 fs/ext4/mballoc.c:3010 ext4_mb_new_blocks+0x6fc/0x1de0 fs/ext4/mballoc.c:4556 ext4_ext_map_blocks+0x1c1e/0x2330 fs/ext4/extents.c:4460 ext4_map_blocks+0x23a/0xfa0 fs/ext4/inode.c:640 mpage_map_one_extent fs/ext4/inode.c:2468 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2517 [inline] ext4_writepages+0x136e/0x2300 fs/ext4/inode.c:2869 do_writepages+0x6b/0x170 mm/page-writeback.c:2344 __writeback_single_inode+0xaf/0x8e0 fs/fs-writeback.c:1449 writeback_sb_inodes+0x4ba/0xa50 fs/fs-writeback.c:1713 __writeback_inodes_wb+0xe8/0x1b0 fs/fs-writeback.c:1782 wb_writeback+0x557/0x6a0 fs/fs-writeback.c:1891 wb_check_background_flush fs/fs-writeback.c:1959 [inline] wb_do_writeback fs/fs-writeback.c:2047 [inline] wb_workfn+0x696/0x970 fs/fs-writeback.c:2075 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 23 Comm: kworker/u4:2 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) ==================================================================