================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_get_folio_gfp read-write to 0xffff88812c807960 of 8 bytes by task 12136 on cpu 1: shmem_add_to_page_cache+0x40a/0x510 mm/shmem.c:742 shmem_get_folio_gfp+0x923/0x1200 mm/shmem.c:1978 shmem_fault+0xdf/0x3c0 mm/shmem.c:2163 __do_fault mm/memory.c:4176 [inline] do_read_fault mm/memory.c:4530 [inline] do_fault mm/memory.c:4659 [inline] do_pte_missing mm/memory.c:3647 [inline] handle_pte_fault mm/memory.c:4947 [inline] __handle_mm_fault mm/memory.c:5089 [inline] handle_mm_fault+0x12f4/0x2c60 mm/memory.c:5243 faultin_page mm/gup.c:925 [inline] __get_user_pages+0x363/0xc30 mm/gup.c:1147 populate_vma_page_range mm/gup.c:1543 [inline] __mm_populate+0x23d/0x370 mm/gup.c:1652 mm_populate include/linux/mm.h:3153 [inline] vm_mmap_pgoff+0x1a3/0x240 mm/util.c:548 ksys_mmap_pgoff+0xc5/0x320 mm/mmap.c:1440 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 0xffff88812c807960 of 8 bytes by task 12132 on cpu 0: shmem_recalc_inode mm/shmem.c:360 [inline] shmem_get_folio_gfp+0xe1e/0x1200 mm/shmem.c:1988 shmem_fault+0xdf/0x3c0 mm/shmem.c:2163 __do_fault mm/memory.c:4176 [inline] do_read_fault mm/memory.c:4530 [inline] do_fault mm/memory.c:4659 [inline] do_pte_missing mm/memory.c:3647 [inline] handle_pte_fault mm/memory.c:4947 [inline] __handle_mm_fault mm/memory.c:5089 [inline] handle_mm_fault+0x12f4/0x2c60 mm/memory.c:5243 do_user_addr_fault arch/x86/mm/fault.c:1440 [inline] handle_page_fault arch/x86/mm/fault.c:1534 [inline] exc_page_fault+0x67e/0x780 arch/x86/mm/fault.c:1590 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 rep_movs_alternative+0x30/0xb0 arch/x86/lib/copy_user_64.S:50 copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:127 [inline] _copy_from_user+0x80/0xd0 lib/usercopy.c:23 copy_from_user include/linux/uaccess.h:183 [inline] copy_msghdr_from_user+0x54/0x2a0 net/socket.c:2434 recvmsg_copy_msghdr net/socket.c:2688 [inline] ___sys_recvmsg net/socket.c:2760 [inline] do_recvmmsg+0x28a/0x710 net/socket.c:2858 __sys_recvmmsg net/socket.c:2937 [inline] __do_sys_recvmmsg net/socket.c:2960 [inline] __se_sys_recvmmsg net/socket.c:2953 [inline] __x64_sys_recvmmsg+0xe2/0x160 net/socket.c:2953 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: 0x000000000000037f -> 0x0000000000000380 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 12132 Comm: syz-executor.4 Not tainted 6.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 ==================================================================