================================================================== BUG: KCSAN: data-race in handle_userfault / userfaultfd_wake_function read to 0xffffc900139bb910 of 8 bytes by task 2976 on cpu 0: list_empty_careful include/linux/list.h:287 [inline] handle_userfault+0xe8d/0xfd0 fs/userfaultfd.c:564 do_anonymous_page mm/memory.c:2994 [inline] handle_pte_fault mm/memory.c:3847 [inline] __handle_mm_fault+0x2abb/0x2cb0 mm/memory.c:3973 handle_mm_fault+0x21b/0x530 mm/memory.c:4010 do_user_addr_fault arch/x86/mm/fault.c:1441 [inline] __do_page_fault+0x3fb/0x9e0 arch/x86/mm/fault.c:1506 do_page_fault+0x54/0x233 arch/x86/mm/fault.c:1530 page_fault+0x34/0x40 arch/x86/entry/entry_64.S:1202 __get_user_4+0x21/0x30 arch/x86/lib/getuser.S:76 tcp_getsockopt+0xb1/0xc0 net/ipv4/tcp.c:3681 sock_common_getsockopt+0x67/0x90 net/core/sock.c:3106 __sys_getsockopt+0xf1/0x210 net/socket.c:2129 __do_sys_getsockopt net/socket.c:2144 [inline] __se_sys_getsockopt net/socket.c:2141 [inline] __x64_sys_getsockopt+0x70/0x90 net/socket.c:2141 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 write to 0xffffc900139bb910 of 8 bytes by task 2979 on cpu 1: INIT_LIST_HEAD include/linux/list.h:29 [inline] list_del_init include/linux/list.h:191 [inline] userfaultfd_wake_function fs/userfaultfd.c:140 [inline] userfaultfd_wake_function+0x168/0x1d0 fs/userfaultfd.c:106 __wake_up_common+0x7b/0x180 kernel/sched/wait.c:93 __wake_up_locked_key+0x16/0x20 kernel/sched/wait.c:157 userfaultfd_release+0x30e/0x3a0 fs/userfaultfd.c:933 __fput+0x1e1/0x520 fs/file_table.c:280 ____fput+0x1f/0x30 fs/file_table.c:313 task_work_run+0xf6/0x130 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x353/0x370 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2979 Comm: syz-executor.3 Not tainted 5.4.0-rc3+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================