================================================================== BUG: KCSAN: data-race in delete_from_page_cache_batch / folio_mapping write to 0xffffea00048e9318 of 8 bytes by task 10577 on cpu 0: page_cache_delete_batch mm/filemap.c:307 [inline] delete_from_page_cache_batch+0x32a/0x710 mm/filemap.c:333 truncate_inode_pages_range+0x1bd/0x6a0 mm/truncate.c:368 truncate_inode_pages mm/truncate.c:448 [inline] truncate_pagecache+0x53/0x70 mm/truncate.c:741 ext4_setattr+0xa03/0xea0 fs/ext4/inode.c:5471 notify_change+0x866/0x8e0 fs/attr.c:499 do_truncate+0x116/0x150 fs/open.c:66 do_sys_ftruncate+0x2ba/0x3b0 fs/open.c:194 __do_sys_ftruncate fs/open.c:205 [inline] __se_sys_ftruncate fs/open.c:203 [inline] __x64_sys_ftruncate+0x33/0x40 fs/open.c:203 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffffea00048e9318 of 8 bytes by task 10537 on cpu 1: folio_mapping+0x92/0x110 mm/util.c:782 folio_evictable mm/internal.h:162 [inline] lru_add_fn+0x8d/0x440 mm/swap.c:181 folio_batch_move_lru+0x21e/0x2f0 mm/swap.c:217 folio_batch_add_and_move mm/swap.c:234 [inline] folio_add_lru mm/swap.c:517 [inline] folio_add_lru_vma+0xf4/0x160 mm/swap.c:537 wp_page_copy mm/memory.c:3190 [inline] do_wp_page+0x10f8/0x1f40 mm/memory.c:3511 handle_pte_fault mm/memory.c:5055 [inline] __handle_mm_fault mm/memory.c:5180 [inline] handle_mm_fault+0xe5d/0x2dd0 mm/memory.c:5345 do_user_addr_fault arch/x86/mm/fault.c:1413 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x2f7/0x6c0 arch/x86/mm/fault.c:1561 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 __put_user_nocheck_4+0x7/0x10 arch/x86/lib/putuser.S:95 ____sys_recvmsg+0x20f/0x310 net/socket.c:2818 ___sys_recvmsg net/socket.c:2847 [inline] do_recvmmsg+0x2eb/0x720 net/socket.c:2941 __sys_recvmmsg net/socket.c:3020 [inline] __do_sys_recvmmsg net/socket.c:3043 [inline] __se_sys_recvmmsg net/socket.c:3036 [inline] __x64_sys_recvmmsg+0xe2/0x160 net/socket.c:3036 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0xffff888106069050 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 10537 Comm: syz-executor.4 Not tainted 6.7.0-rc8-syzkaller-00119-g1f874787ed9a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 ==================================================================