================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp read-write to 0xffff888102826c10 of 8 bytes by task 12982 on cpu 0: 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:4157 [inline] do_read_fault mm/memory.c:4503 [inline] do_fault+0x500/0xb20 mm/memory.c:4632 handle_pte_fault mm/memory.c:4895 [inline] __handle_mm_fault mm/memory.c:5034 [inline] handle_mm_fault+0x889/0xa90 mm/memory.c:5132 faultin_page mm/gup.c:953 [inline] __get_user_pages+0x34a/0xbf0 mm/gup.c:1174 populate_vma_page_range mm/gup.c:1518 [inline] __mm_populate+0x26e/0x3a0 mm/gup.c:1631 mm_populate include/linux/mm.h:2706 [inline] vm_mmap_pgoff+0x160/0x1f0 mm/util.c:557 ksys_mmap_pgoff+0xc2/0x320 mm/mmap.c:1633 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+0x46/0xb0 read to 0xffff888102826c10 of 8 bytes by task 12990 on cpu 1: 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:4157 [inline] do_read_fault mm/memory.c:4503 [inline] do_fault+0x500/0xb20 mm/memory.c:4632 handle_pte_fault mm/memory.c:4895 [inline] __handle_mm_fault mm/memory.c:5034 [inline] handle_mm_fault+0x889/0xa90 mm/memory.c:5132 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+0x27/0x30 copy_user_enhanced_fast_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] copyin lib/iov_iter.c:166 [inline] _copy_from_iter+0x19d/0x820 lib/iov_iter.c:767 copy_from_iter include/linux/uio.h:171 [inline] copy_from_iter_full include/linux/uio.h:177 [inline] skb_do_copy_data_nocache include/net/sock.h:2218 [inline] skb_copy_to_page_nocache include/net/sock.h:2244 [inline] tcp_sendmsg_locked+0x1155/0x1fd0 net/ipv4/tcp.c:1342 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1448 inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:819 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] __sys_sendto+0x21e/0x2c0 net/socket.c:2119 __do_sys_sendto net/socket.c:2131 [inline] __se_sys_sendto net/socket.c:2127 [inline] __x64_sys_sendto+0x74/0x90 net/socket.c:2127 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+0x46/0xb0 value changed: 0x0000000000000247 -> 0x0000000000000248 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 12990 Comm: syz-executor.4 Not tainted 5.18.0-syzkaller-11267-gb00ed48bb0a7-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================