================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_writepage read-write to 0xffff88813a7b5860 of 8 bytes by task 32475 on cpu 0: shmem_add_to_page_cache+0x40a/0x510 mm/shmem.c:742 shmem_get_folio_gfp+0x923/0x1200 mm/shmem.c:1978 shmem_get_folio mm/shmem.c:2079 [inline] shmem_write_begin+0xa6/0x1d0 mm/shmem.c:2573 generic_perform_write+0x1c3/0x3d0 mm/filemap.c:3929 __generic_file_write_iter+0xe6/0x290 mm/filemap.c:4057 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4089 call_write_iter include/linux/fs.h:1868 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x47b/0x780 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 read to 0xffff88813a7b5860 of 8 bytes by task 32479 on cpu 1: shmem_recalc_inode mm/shmem.c:360 [inline] shmem_writepage+0x618/0xb40 mm/shmem.c:1433 pageout mm/vmscan.c:1365 [inline] shrink_folio_list+0x195e/0x2550 mm/vmscan.c:2024 reclaim_folio_list+0x7b/0x1d0 mm/vmscan.c:2790 reclaim_pages+0x220/0x280 mm/vmscan.c:2826 madvise_cold_or_pageout_pte_range+0x8c7/0x950 mm/madvise.c:516 walk_pmd_range mm/pagewalk.c:128 [inline] walk_pud_range mm/pagewalk.c:205 [inline] walk_p4d_range mm/pagewalk.c:240 [inline] walk_pgd_range+0x7d7/0xc80 mm/pagewalk.c:277 __walk_page_range+0xc2/0x310 mm/pagewalk.c:379 walk_page_range+0x20b/0x330 mm/pagewalk.c:477 madvise_pageout_page_range mm/madvise.c:574 [inline] madvise_pageout mm/madvise.c:601 [inline] madvise_vma_behavior mm/madvise.c:1019 [inline] madvise_walk_vmas mm/madvise.c:1248 [inline] do_madvise+0x1e05/0x2920 mm/madvise.c:1428 __do_sys_madvise mm/madvise.c:1441 [inline] __se_sys_madvise mm/madvise.c:1439 [inline] __x64_sys_madvise+0x60/0x70 mm/madvise.c:1439 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: 0x0000000000000781 -> 0x0000000000000782 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 32479 Comm: syz-executor.3 Not tainted 6.4.0-rc7-syzkaller-00041-ge660abd551f1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 ==================================================================