================================================================== BUG: KCSAN: data-race in __filemap_remove_folio / folio_mapping write to 0xffffea00046c8118 of 8 bytes by task 3871 on cpu 0: page_cache_delete mm/filemap.c:152 [inline] __filemap_remove_folio+0x1ac/0x2c0 mm/filemap.c:232 filemap_remove_folio+0x6b/0x1f0 mm/filemap.c:264 truncate_inode_folio+0x42/0x50 mm/truncate.c:162 shmem_undo_range+0x25b/0xa70 mm/shmem.c:1036 shmem_truncate_range mm/shmem.c:1152 [inline] shmem_evict_inode+0x14d/0x530 mm/shmem.c:1280 evict+0x2f0/0x570 fs/inode.c:796 iput_final fs/inode.c:1946 [inline] iput+0x42a/0x5b0 fs/inode.c:1972 dentry_unlink_inode+0x24f/0x260 fs/dcache.c:422 __dentry_kill+0x18b/0x4c0 fs/dcache.c:625 dput+0x5c/0xd0 fs/dcache.c:867 do_renameat2+0x748/0xa70 fs/namei.c:5226 __do_sys_rename fs/namei.c:5271 [inline] __se_sys_rename fs/namei.c:5269 [inline] __x64_sys_rename+0x58/0x70 fs/namei.c:5269 x64_sys_call+0x2b1c/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:83 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffffea00046c8118 of 8 bytes by task 3957 on cpu 1: folio_mapping+0xa0/0x120 mm/util.c:847 folio_evictable mm/internal.h:435 [inline] lru_add+0x89/0x440 mm/swap.c:136 folio_batch_move_lru+0x15f/0x230 mm/swap.c:168 __folio_batch_add_and_move mm/swap.c:196 [inline] folio_add_lru+0x145/0x1f0 mm/swap.c:482 shmem_alloc_and_add_folio mm/shmem.c:1892 [inline] shmem_get_folio_gfp+0x7d6/0xd90 mm/shmem.c:2355 shmem_get_folio mm/shmem.c:2461 [inline] shmem_write_begin+0xa2/0x180 mm/shmem.c:3117 generic_perform_write+0x1a8/0x4a0 mm/filemap.c:4055 shmem_file_write_iter+0xc2/0xe0 mm/shmem.c:3293 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x77f/0x920 fs/read_write.c:679 ksys_pwrite64 fs/read_write.c:786 [inline] __do_sys_pwrite64 fs/read_write.c:794 [inline] __se_sys_pwrite64 fs/read_write.c:791 [inline] __x64_sys_pwrite64+0xf6/0x150 fs/read_write.c:791 x64_sys_call+0xab0/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:19 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0xffff8881186564d0 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 3957 Comm: syz.1.156 Not tainted 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 ==================================================================