================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp read-write to 0xffff8881066515b0 of 8 bytes by task 8244 on cpu 1: shmem_add_to_page_cache+0x802/0x8f0 mm/shmem.c:745 shmem_getpage_gfp+0x7af/0x1750 mm/shmem.c:1939 shmem_fault+0xd2/0x350 mm/shmem.c:2116 __do_fault mm/memory.c:4165 [inline] do_read_fault mm/memory.c:4514 [inline] do_fault+0x500/0xb20 mm/memory.c:4643 handle_pte_fault mm/memory.c:4907 [inline] __handle_mm_fault mm/memory.c:5046 [inline] handle_mm_fault+0x889/0xa90 mm/memory.c:5144 do_user_addr_fault+0x4cd/0x940 arch/x86/mm/fault.c:1397 handle_page_fault arch/x86/mm/fault.c:1484 [inline] exc_page_fault+0x60/0x160 arch/x86/mm/fault.c:1540 asm_exc_page_fault+0x22/0x30 copy_user_short_string+0xa/0x40 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:152 [inline] __copy_msghdr_from_user net/socket.c:2369 [inline] copy_msghdr_from_user net/socket.c:2421 [inline] recvmsg_copy_msghdr net/socket.c:2673 [inline] ___sys_recvmsg net/socket.c:2745 [inline] do_recvmmsg+0x281/0xa40 net/socket.c:2843 __sys_recvmmsg net/socket.c:2922 [inline] __do_sys_recvmmsg net/socket.c:2945 [inline] __se_sys_recvmmsg net/socket.c:2938 [inline] __x64_sys_recvmmsg+0xde/0x160 net/socket.c:2938 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 0xffff8881066515b0 of 8 bytes by task 8252 on cpu 0: shmem_recalc_inode mm/shmem.c:362 [inline] shmem_getpage_gfp+0xd8b/0x1750 mm/shmem.c:1949 shmem_fault+0xd2/0x350 mm/shmem.c:2116 __do_fault mm/memory.c:4165 [inline] do_read_fault mm/memory.c:4514 [inline] do_fault+0x500/0xb20 mm/memory.c:4643 handle_pte_fault mm/memory.c:4907 [inline] __handle_mm_fault mm/memory.c:5046 [inline] handle_mm_fault+0x889/0xa90 mm/memory.c:5144 faultin_page mm/gup.c:955 [inline] __get_user_pages+0x34a/0xbf0 mm/gup.c:1176 populate_vma_page_range mm/gup.c:1520 [inline] __mm_populate+0x26e/0x3a0 mm/gup.c:1633 mm_populate include/linux/mm.h:2710 [inline] __do_sys_remap_file_pages+0x39c/0x590 mm/mmap.c:3008 __se_sys_remap_file_pages mm/mmap.c:2937 [inline] __x64_sys_remap_file_pages+0x63/0x70 mm/mmap.c:2937 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: 0x000000000000005f -> 0x0000000000000060 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 8252 Comm: syz-executor.5 Not tainted 5.19.0-rc8-syzkaller-00105-g6e2c0490769e-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 ==================================================================