==================================================================
BUG: KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath

read to 0xffff88813902f770 of 8 bytes by task 6831 on cpu 1:
 mem_cgroup_track_foreign_dirty_slowpath+0x2fc/0x440 mm/memcontrol.c:4708
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1691 [inline]
 folio_account_dirtied mm/page-writeback.c:2629 [inline]
 __folio_mark_dirty+0x3fc/0x4e0 mm/page-writeback.c:2669
 mark_buffer_dirty+0x148/0x240 fs/buffer.c:1212
 __block_commit_write fs/buffer.c:2192 [inline]
 block_write_end+0x158/0x2e0 fs/buffer.c:2268
 ext4_da_do_write_end fs/ext4/inode.c:2951 [inline]
 ext4_da_write_end+0x1fc/0x9c0 fs/ext4/inode.c:3023
 generic_perform_write+0x267/0x410 mm/filemap.c:3980
 ext4_buffered_write_iter+0x1f6/0x370 fs/ext4/file.c:299
 ext4_file_write_iter+0xd6/0x1200
 call_write_iter include/linux/fs.h:1956 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x4ab/0x7d0 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

write to 0xffff88813902f770 of 8 bytes by task 6851 on cpu 0:
 mem_cgroup_track_foreign_dirty_slowpath+0x3b3/0x440
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1691 [inline]
 folio_account_dirtied mm/page-writeback.c:2629 [inline]
 __folio_mark_dirty+0x3fc/0x4e0 mm/page-writeback.c:2669
 mark_buffer_dirty+0x148/0x240 fs/buffer.c:1212
 __block_commit_write fs/buffer.c:2192 [inline]
 block_write_end+0x158/0x2e0 fs/buffer.c:2268
 ext4_da_do_write_end fs/ext4/inode.c:2951 [inline]
 ext4_da_write_end+0x1fc/0x9c0 fs/ext4/inode.c:3023
 generic_perform_write+0x267/0x410 mm/filemap.c:3980
 ext4_buffered_write_iter+0x1f6/0x370 fs/ext4/file.c:299
 ext4_file_write_iter+0xd6/0x1200
 call_write_iter include/linux/fs.h:1956 [inline]
 aio_write+0x306/0x420 fs/aio.c:1582
 io_submit_one+0xb39/0x1250 fs/aio.c:2001
 __do_sys_io_submit fs/aio.c:2060 [inline]
 __se_sys_io_submit+0xf5/0x280 fs/aio.c:2030
 __x64_sys_io_submit+0x43/0x50 fs/aio.c:2030
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x000000010004b82b -> 0x000000010004b890

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6851 Comm: syz-executor.3 Not tainted 6.6.0-rc7-syzkaller-00187-g51a7691038c3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
==================================================================