================================================================== BUG: KCSAN: data-race in next_uptodate_page / shmem_write_end write to 0xffff888134366d58 of 8 bytes by task 24254 on cpu 0: i_size_write include/linux/fs.h:905 [inline] shmem_write_end+0x9a/0x4a0 mm/shmem.c:2598 generic_perform_write+0x253/0x3d0 mm/filemap.c:3940 __generic_file_write_iter+0xe6/0x290 mm/filemap.c:4057 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4089 do_iter_write+0x4ae/0x770 fs/read_write.c:860 vfs_iter_write+0x50/0x70 fs/read_write.c:901 iter_file_splice_write+0x456/0x7d0 fs/splice.c:795 do_splice_from fs/splice.c:873 [inline] direct_splice_actor+0x84/0xa0 fs/splice.c:1039 splice_direct_to_actor+0x2ee/0x5f0 fs/splice.c:994 do_splice_direct+0x104/0x180 fs/splice.c:1082 do_sendfile+0x3b8/0x950 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1316 [inline] __se_sys_sendfile64 fs/read_write.c:1308 [inline] __x64_sys_sendfile64+0xbd/0x150 fs/read_write.c:1308 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 0xffff888134366d58 of 8 bytes by task 24258 on cpu 1: i_size_read include/linux/fs.h:883 [inline] next_uptodate_page+0x47b/0x560 mm/filemap.c:3460 first_map_page mm/filemap.c:3477 [inline] filemap_map_pages+0x100/0x860 mm/filemap.c:3504 do_fault_around mm/memory.c:4493 [inline] do_read_fault mm/memory.c:4525 [inline] do_fault mm/memory.c:4659 [inline] do_pte_missing mm/memory.c:3647 [inline] handle_pte_fault mm/memory.c:4947 [inline] __handle_mm_fault mm/memory.c:5089 [inline] handle_mm_fault+0x1120/0x2c60 mm/memory.c:5243 do_user_addr_fault arch/x86/mm/fault.c:1440 [inline] handle_page_fault arch/x86/mm/fault.c:1534 [inline] exc_page_fault+0x67e/0x780 arch/x86/mm/fault.c:1590 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 rep_movs_alternative+0x4a/0xb0 arch/x86/lib/copy_user_64.S:65 copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:127 [inline] _copy_from_user+0x80/0xd0 lib/usercopy.c:23 copy_from_user include/linux/uaccess.h:183 [inline] __get_filter+0xc7/0x210 net/core/filter.c:1499 sk_attach_filter+0x1e/0xe0 net/core/filter.c:1530 sk_setsockopt+0x16da/0x1de0 net/core/sock.c:1297 sock_setsockopt+0x3c/0x50 net/core/sock.c:1546 __sys_setsockopt+0x177/0x230 net/socket.c:2269 __do_sys_setsockopt net/socket.c:2284 [inline] __se_sys_setsockopt net/socket.c:2281 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2281 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: 0x0000000000002d64 -> 0x0000000000002d6e Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 24258 Comm: syz-executor.3 Not tainted 6.4.0-rc7-syzkaller-00041-ge660abd551f1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 ==================================================================