================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_writepage read-write to 0xffff888124e83de0 of 8 bytes by task 29077 on cpu 1: shmem_add_to_page_cache+0x40a/0x510 mm/shmem.c:742 shmem_swapin_folio+0x852/0xa40 mm/shmem.c:1809 shmem_get_folio_gfp+0x264/0x1200 mm/shmem.c:1891 shmem_fault+0xe6/0x3f0 mm/shmem.c:2163 __do_fault mm/memory.c:4198 [inline] do_shared_fault mm/memory.c:4602 [inline] do_fault mm/memory.c:4674 [inline] do_pte_missing mm/memory.c:3664 [inline] handle_pte_fault mm/memory.c:4939 [inline] __handle_mm_fault mm/memory.c:5079 [inline] handle_mm_fault+0x131b/0x2c10 mm/memory.c:5233 faultin_page mm/gup.c:959 [inline] __get_user_pages+0x42e/0xd20 mm/gup.c:1258 faultin_vma_page_range+0x7e/0xa0 mm/gup.c:1707 madvise_populate mm/madvise.c:933 [inline] madvise_vma_behavior mm/madvise.c:1042 [inline] madvise_walk_vmas mm/madvise.c:1264 [inline] do_madvise+0x97c/0x29b0 mm/madvise.c:1444 __do_sys_madvise mm/madvise.c:1457 [inline] __se_sys_madvise mm/madvise.c:1455 [inline] __x64_sys_madvise+0x60/0x70 mm/madvise.c:1455 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 0xffff888124e83de0 of 8 bytes by task 29181 on cpu 0: shmem_recalc_inode mm/shmem.c:360 [inline] shmem_writepage+0x618/0xb40 mm/shmem.c:1433 pageout mm/vmscan.c:1355 [inline] shrink_folio_list+0x195e/0x2550 mm/vmscan.c:2015 reclaim_folio_list+0x7b/0x1d0 mm/vmscan.c:2801 reclaim_pages+0x220/0x280 mm/vmscan.c:2837 madvise_cold_or_pageout_pte_range+0x82c/0x890 mm/madvise.c:529 walk_pmd_range mm/pagewalk.c:140 [inline] walk_pud_range mm/pagewalk.c:218 [inline] walk_p4d_range mm/pagewalk.c:253 [inline] walk_pgd_range+0x7f3/0xd10 mm/pagewalk.c:290 __walk_page_range+0xc2/0x320 mm/pagewalk.c:392 walk_page_range+0x20b/0x330 mm/pagewalk.c:490 madvise_pageout_page_range mm/madvise.c:587 [inline] madvise_pageout mm/madvise.c:614 [inline] madvise_vma_behavior mm/madvise.c:1035 [inline] madvise_walk_vmas mm/madvise.c:1264 [inline] do_madvise+0x1eea/0x29b0 mm/madvise.c:1444 __do_sys_madvise mm/madvise.c:1457 [inline] __se_sys_madvise mm/madvise.c:1455 [inline] __x64_sys_madvise+0x60/0x70 mm/madvise.c:1455 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: 0x00000000000008f7 -> 0x00000000000008f8 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 29181 Comm: syz-executor.0 Not tainted 6.5.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 ==================================================================