================================================================== BUG: KCSAN: data-race in next_uptodate_page / shmem_write_end write to 0xffff8881311752a8 of 8 bytes by task 6538 on cpu 0: i_size_write include/linux/fs.h:901 [inline] shmem_write_end+0x9a/0x4a0 mm/shmem.c:2598 generic_perform_write+0x26d/0x410 mm/filemap.c:3934 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4018 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4044 do_iter_write+0x4b4/0x7b0 fs/read_write.c:860 vfs_iter_write+0x56/0x70 fs/read_write.c:901 iter_file_splice_write+0x462/0x7e0 fs/splice.c:739 do_splice_from fs/splice.c:934 [inline] direct_splice_actor+0x8a/0xb0 fs/splice.c:1143 splice_direct_to_actor+0x31d/0x690 fs/splice.c:1089 do_splice_direct+0x10d/0x190 fs/splice.c:1195 do_sendfile+0x3b6/0x9a0 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 0xffff8881311752a8 of 8 bytes by task 6546 on cpu 1: i_size_read include/linux/fs.h:879 [inline] next_uptodate_page+0x47b/0x560 mm/filemap.c:3465 next_map_page mm/filemap.c:3490 [inline] filemap_map_pages+0x6df/0x890 mm/filemap.c:3567 do_fault_around mm/memory.c:4510 [inline] do_read_fault mm/memory.c:4542 [inline] do_fault mm/memory.c:4670 [inline] do_pte_missing mm/memory.c:3664 [inline] handle_pte_fault mm/memory.c:4939 [inline] __handle_mm_fault mm/memory.c:5079 [inline] handle_mm_fault+0x104d/0x2c10 mm/memory.c:5233 do_user_addr_fault arch/x86/mm/fault.c:1392 [inline] handle_page_fault arch/x86/mm/fault.c:1486 [inline] exc_page_fault+0x24d/0x650 arch/x86/mm/fault.c:1542 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+0x1741/0x1df0 net/core/sock.c:1308 sock_setsockopt+0x3c/0x50 net/core/sock.c:1551 __sys_setsockopt+0x17d/0x230 net/socket.c:2259 __do_sys_setsockopt net/socket.c:2274 [inline] __se_sys_setsockopt net/socket.c:2271 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2271 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: 0x0000000000002382 -> 0x00000000000023a0 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 6546 Comm: syz-executor.5 Tainted: G W 6.5.0-rc2-syzkaller-00052-gbfa3037d8280 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 ==================================================================