================================================================== BUG: KCSAN: data-race in shmem_add_to_page_cache / shmem_getpage_gfp write to 0xffff88812d053780 of 8 bytes by task 22895 on cpu 0: shmem_add_to_page_cache+0x52d/0x650 mm/shmem.c:718 shmem_getpage_gfp+0xbdc/0x1410 mm/shmem.c:1929 shmem_fault+0x16d/0x500 mm/shmem.c:2116 __do_fault mm/memory.c:3637 [inline] do_read_fault mm/memory.c:3939 [inline] do_fault mm/memory.c:4067 [inline] handle_pte_fault mm/memory.c:4318 [inline] __handle_mm_fault mm/memory.c:4453 [inline] handle_mm_fault+0xe8d/0x1a70 mm/memory.c:4551 do_user_addr_fault+0x60c/0xc00 arch/x86/mm/fault.c:1390 handle_page_fault arch/x86/mm/fault.c:1475 [inline] exc_page_fault+0x94/0x230 arch/x86/mm/fault.c:1531 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:577 copy_user_generic_unrolled+0x86/0xc0 arch/x86/lib/copy_user_64.S:90 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+0x7e/0xd0 lib/usercopy.c:16 copy_from_user include/linux/uaccess.h:192 [inline] __copy_msghdr_from_user+0x44/0x350 net/socket.c:2232 copy_msghdr_from_user net/socket.c:2283 [inline] sendmsg_copy_msghdr net/socket.c:2381 [inline] ___sys_sendmsg net/socket.c:2400 [inline] __sys_sendmmsg+0x1f0/0x4b0 net/socket.c:2490 __do_sys_sendmmsg net/socket.c:2519 [inline] __se_sys_sendmmsg net/socket.c:2516 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2516 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88812d053780 of 8 bytes by task 22899 on cpu 1: shmem_recalc_inode mm/shmem.c:367 [inline] shmem_getpage_gfp+0x1017/0x1410 mm/shmem.c:1939 shmem_fault+0x16d/0x500 mm/shmem.c:2116 __do_fault mm/memory.c:3637 [inline] do_read_fault mm/memory.c:3939 [inline] do_fault mm/memory.c:4067 [inline] handle_pte_fault mm/memory.c:4318 [inline] __handle_mm_fault mm/memory.c:4453 [inline] handle_mm_fault+0xe8d/0x1a70 mm/memory.c:4551 do_user_addr_fault+0x60c/0xc00 arch/x86/mm/fault.c:1390 handle_page_fault arch/x86/mm/fault.c:1475 [inline] exc_page_fault+0x94/0x230 arch/x86/mm/fault.c:1531 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:577 copy_user_generic_unrolled+0x86/0xc0 arch/x86/lib/copy_user_64.S:90 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+0x7e/0xd0 lib/usercopy.c:16 copy_from_user include/linux/uaccess.h:192 [inline] __copy_msghdr_from_user net/socket.c:2232 [inline] copy_msghdr_from_user net/socket.c:2283 [inline] recvmsg_copy_msghdr net/socket.c:2535 [inline] ___sys_recvmsg net/socket.c:2607 [inline] do_recvmmsg+0x240/0x9e0 net/socket.c:2705 __sys_recvmmsg net/socket.c:2784 [inline] __do_sys_recvmmsg net/socket.c:2807 [inline] __se_sys_recvmmsg net/socket.c:2800 [inline] __x64_sys_recvmmsg+0xcf/0x150 net/socket.c:2800 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 22899 Comm: syz-executor.5 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================