__mm_populate+0x27a/0x460 mm/gup.c:2032 mm_populate include/linux/mm.h:3386 [inline] vm_mmap_pgoff+0x303/0x430 mm/util.c:580 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 page last free pid 6024 tgid 6024 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xe40/0x18b0 mm/page_alloc.c:2707 folios_put_refs+0x76c/0x860 mm/swap.c:994 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x593/0x1820 mm/shmem.c:1112 shmem_truncate_range mm/shmem.c:1224 [inline] shmem_evict_inode+0x29b/0xa80 mm/shmem.c:1352 evict+0x4e8/0x9a0 fs/inode.c:796 do_unlinkat+0x512/0x830 fs/namei.c:4596 __do_sys_unlink fs/namei.c:4637 [inline] __se_sys_unlink fs/namei.c:4635 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4635 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f ------------[ cut here ]------------ kernel BUG at mm/filemap.c:154! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 UID: 0 PID: 6484 Comm: syz.5.145 Not tainted 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 RIP: 0010:filemap_unaccount_folio+0x73d/0x7d0 mm/filemap.c:154 Code: de c7 ff 48 89 df 48 c7 c6 e0 d3 13 8c e8 fb f3 11 00 90 0f 0b e8 a3 de c7 ff 48 89 df 48 c7 c6 c0 d2 13 8c e8 e4 f3 11 00 90 <0f> 0b e8 8c de c7 ff 48 89 df 48 c7 c6 e0 d3 13 8c e8 cd f3 11 00 RSP: 0018:ffffc90002f17070 EFLAGS: 00010046 RAX: 5b78b4b152642400 RBX: ffffea0001749040 RCX: ffffc90002f16c03 RDX: 0000000000000002 RSI: ffffffff8c0ab8e0 RDI: ffffffff8c608cc0 RBP: 0000000000000000 R08: ffffffff901b6077 R09: 1ffffffff2036c0e R10: dffffc0000000000 R11: fffffbfff2036c0f R12: dffffc0000000000 R13: 1ffffd40002e9209 R14: ffff888035795888 R15: ffffea0001749048 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2c3a18bff8 CR3: 00000000628cc000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __filemap_remove_folio+0xc7/0x670 mm/filemap.c:223 filemap_remove_folio+0xe1/0x1f0 mm/filemap.c:256 truncate_inode_folio+0x5d/0x70 mm/truncate.c:162 shmem_undo_range+0x44b/0x1820 mm/shmem.c:1108 shmem_truncate_range mm/shmem.c:1224 [inline] shmem_evict_inode+0x29b/0xa80 mm/shmem.c:1352 evict+0x4e8/0x9a0 fs/inode.c:796 __dentry_kill+0x20d/0x630 fs/dcache.c:643 dput+0x19f/0x2b0 fs/dcache.c:885 __fput+0x60b/0x9f0 fs/file_table.c:472 task_work_run+0x24f/0x310 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa2a/0x28e0 kernel/exit.c:938 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 get_signal+0x16b2/0x1750 kernel/signal.c:3036 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9f7a38cde9 Code: Unable to access opcode bytes at 0x7f9f7a38cdbf. RSP: 002b:00007f9f7b17d0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f9f7a5a6088 RCX: 00007f9f7a38cde9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f9f7a5a6088 RBP: 00007f9f7a5a6080 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9f7a5a608c R13: 0000000000000000 R14: 00007f9f7a6cf940 R15: 00007f9f7a6cfa28 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:filemap_unaccount_folio+0x73d/0x7d0 mm/filemap.c:154 Code: de c7 ff 48 89 df 48 c7 c6 e0 d3 13 8c e8 fb f3 11 00 90 0f 0b e8 a3 de c7 ff 48 89 df 48 c7 c6 c0 d2 13 8c e8 e4 f3 11 00 90 <0f> 0b e8 8c de c7 ff 48 89 df 48 c7 c6 e0 d3 13 8c e8 cd f3 11 00 RSP: 0018:ffffc90002f17070 EFLAGS: 00010046 RAX: 5b78b4b152642400 RBX: ffffea0001749040 RCX: ffffc90002f16c03 RDX: 0000000000000002 RSI: ffffffff8c0ab8e0 RDI: ffffffff8c608cc0 RBP: 0000000000000000 R08: ffffffff901b6077 R09: 1ffffffff2036c0e R10: dffffc0000000000 R11: fffffbfff2036c0f R12: dffffc0000000000 R13: 1ffffd40002e9209 R14: ffff888035795888 R15: ffffea0001749048 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2c3a18bff8 CR3: 00000000628cc000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400