================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_get_folio_gfp read-write to 0xffff8881078842c8 of 8 bytes by task 6341 on cpu 0: shmem_add_to_page_cache+0x417/0x500 mm/shmem.c:738 shmem_get_folio_gfp+0x6ba/0x1330 mm/shmem.c:1943 shmem_fault+0xd5/0x3d0 mm/shmem.c:2128 __do_fault mm/memory.c:4187 [inline] do_read_fault mm/memory.c:4538 [inline] do_fault+0x4e8/0xaf0 mm/memory.c:4667 handle_pte_fault mm/memory.c:4939 [inline] __handle_mm_fault mm/memory.c:5081 [inline] handle_mm_fault+0x877/0xa80 mm/memory.c:5202 faultin_page mm/gup.c:997 [inline] __get_user_pages+0x32a/0xbf0 mm/gup.c:1218 populate_vma_page_range mm/gup.c:1575 [inline] __mm_populate+0x281/0x380 mm/gup.c:1689 mm_populate include/linux/mm.h:2744 [inline] __do_sys_remap_file_pages+0x379/0x4a0 mm/mmap.c:2875 __se_sys_remap_file_pages mm/mmap.c:2804 [inline] __x64_sys_remap_file_pages+0x63/0x70 mm/mmap.c:2804 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+0x63/0xcd read to 0xffff8881078842c8 of 8 bytes by task 6339 on cpu 1: shmem_recalc_inode mm/shmem.c:353 [inline] shmem_get_folio_gfp+0xd24/0x1330 mm/shmem.c:1953 shmem_fault+0xd5/0x3d0 mm/shmem.c:2128 __do_fault mm/memory.c:4187 [inline] do_read_fault mm/memory.c:4538 [inline] do_fault+0x4e8/0xaf0 mm/memory.c:4667 handle_pte_fault mm/memory.c:4939 [inline] __handle_mm_fault mm/memory.c:5081 [inline] handle_mm_fault+0x877/0xa80 mm/memory.c:5202 do_user_addr_fault+0x4a1/0x980 arch/x86/mm/fault.c:1428 handle_page_fault arch/x86/mm/fault.c:1519 [inline] exc_page_fault+0x60/0x160 arch/x86/mm/fault.c:1575 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 copy_user_short_string+0xa/0x40 arch/x86/lib/copy_user_64.S:231 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline] _copy_from_user+0x78/0xc0 lib/usercopy.c:16 copy_from_user include/linux/uaccess.h:161 [inline] copy_msghdr_from_user net/socket.c:2413 [inline] recvmsg_copy_msghdr+0x66/0x2d0 net/socket.c:2667 ___sys_recvmsg net/socket.c:2739 [inline] do_recvmmsg+0x2ac/0x710 net/socket.c:2837 __sys_recvmmsg net/socket.c:2916 [inline] __do_sys_recvmmsg net/socket.c:2939 [inline] __se_sys_recvmmsg net/socket.c:2932 [inline] __x64_sys_recvmmsg+0xde/0x160 net/socket.c:2932 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+0x63/0xcd value changed: 0x00000000000000e1 -> 0x00000000000000e2 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 6339 Comm: syz-executor.0 Not tainted 6.0.0-syzkaller-11414-g49da07006239-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 ==================================================================