================================================================== BUG: KCSAN: data-race in next_uptodate_page / shmem_write_end write to 0xffff88812bd6d7b8 of 8 bytes by task 4224 on cpu 1: i_size_write include/linux/fs.h:888 [inline] shmem_write_end+0x9a/0x4a0 mm/shmem.c:2586 generic_perform_write+0x253/0x3d0 mm/filemap.c:3937 __generic_file_write_iter+0xe6/0x290 mm/filemap.c:4054 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4086 do_iter_write+0x418/0x700 fs/read_write.c:861 vfs_iter_write+0x50/0x70 fs/read_write.c:902 iter_file_splice_write+0x456/0x7d0 fs/splice.c:778 do_splice_from fs/splice.c:856 [inline] direct_splice_actor+0x84/0xa0 fs/splice.c:1022 splice_direct_to_actor+0x2ee/0x5f0 fs/splice.c:977 do_splice_direct+0x104/0x180 fs/splice.c:1065 do_sendfile+0x3b8/0x950 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64 fs/read_write.c:1309 [inline] __x64_sys_sendfile64+0xbd/0x150 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88812bd6d7b8 of 8 bytes by task 4240 on cpu 0: i_size_read include/linux/fs.h:866 [inline] next_uptodate_page+0x47b/0x560 mm/filemap.c:3457 first_map_page mm/filemap.c:3474 [inline] filemap_map_pages+0xf9/0x830 mm/filemap.c:3501 do_fault_around mm/memory.c:4475 [inline] do_read_fault mm/memory.c:4501 [inline] do_fault mm/memory.c:4635 [inline] handle_pte_fault mm/memory.c:4923 [inline] __handle_mm_fault mm/memory.c:5065 [inline] handle_mm_fault+0xfc3/0x21d0 mm/memory.c:5211 do_user_addr_fault arch/x86/mm/fault.c:1407 [inline] handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x45f/0x640 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:165 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+0x7f/0xd0 lib/usercopy.c:23 copy_from_user include/linux/uaccess.h:161 [inline] __get_filter+0xc7/0x210 net/core/filter.c:1499 sk_reuseport_attach_filter+0x22/0x130 net/core/filter.c:1548 sk_setsockopt+0x1528/0x1e70 net/core/sock.c:1318 sock_setsockopt+0x3c/0x50 net/core/sock.c:1551 __sys_setsockopt+0x177/0x230 net/socket.c:2267 __do_sys_setsockopt net/socket.c:2282 [inline] __se_sys_setsockopt net/socket.c:2279 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2279 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x000000000000f58c -> 0x000000000000f5aa Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 4240 Comm: syz-executor.3 Not tainted 6.3.0-rc7-syzkaller-00089-gcb0856346a60 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 ==================================================================