================================================================== BUG: KCSAN: data-race in folio_mapping / page_cache_delete write to 0xffffea0004360598 of 8 bytes by task 24247 on cpu 0: page_cache_delete+0x30d/0x360 mm/filemap.c:143 __filemap_remove_folio+0x3b/0xf0 mm/filemap.c:223 filemap_remove_folio+0x69/0x120 mm/filemap.c:255 truncate_inode_folio+0x204/0x210 mm/truncate.c:196 shmem_undo_range+0x3d2/0x1160 mm/shmem.c:952 shmem_truncate_range mm/shmem.c:1044 [inline] shmem_evict_inode+0x141/0x570 mm/shmem.c:1133 evict+0x1aa/0x410 fs/inode.c:664 iput_final fs/inode.c:1744 [inline] iput+0x3f9/0x580 fs/inode.c:1770 dentry_unlink_inode+0x22a/0x240 fs/dcache.c:401 __dentry_kill+0x28b/0x450 fs/dcache.c:607 dentry_kill+0x8d/0x1e0 dput+0x11e/0x1f0 fs/dcache.c:913 __fput+0x3dd/0x510 fs/file_table.c:330 ____fput+0x11/0x20 fs/file_table.c:350 task_work_run+0x8e/0x110 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x46/0xb0 read to 0xffffea0004360598 of 8 bytes by task 1808 on cpu 1: folio_mapping+0x92/0x120 mm/util.c:806 folio_evictable mm/internal.h:136 [inline] __pagevec_lru_add_fn+0x134/0x520 mm/swap.c:1024 __pagevec_lru_add+0x1c6/0x320 mm/swap.c:1060 lru_add_drain_cpu+0x6a/0x260 mm/swap.c:601 lru_add_drain+0x21/0x60 mm/swap.c:706 zap_page_range+0x5d/0x2a0 mm/memory.c:1741 madvise_dontneed_single_vma mm/madvise.c:788 [inline] madvise_dontneed_free mm/madvise.c:871 [inline] madvise_vma_behavior mm/madvise.c:1010 [inline] madvise_walk_vmas mm/madvise.c:1232 [inline] do_madvise+0xb39/0x1300 mm/madvise.c:1410 __do_sys_madvise mm/madvise.c:1423 [inline] __se_sys_madvise mm/madvise.c:1421 [inline] __x64_sys_madvise+0x5d/0x70 mm/madvise.c:1421 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 value changed: 0xffff88811cf49e80 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 1808 Comm: syz-fuzzer Not tainted 5.19.0-rc5-syzkaller-00228-ge5524c2a1fc4-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 ==================================================================