vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893 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 page last free pid 6344 tgid 6344 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_folios+0xf23/0x19e0 mm/page_alloc.c:2614 folios_put_refs+0x93a/0xa60 mm/swap.c:1024 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x6de/0x1df0 mm/shmem.c:1005 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29b/0xa60 mm/shmem.c:1242 evict+0x2a8/0x630 fs/inode.c:667 do_unlinkat+0x512/0x830 fs/namei.c:4414 __do_sys_unlink fs/namei.c:4455 [inline] __se_sys_unlink fs/namei.c:4453 [inline] __x64_sys_unlink+0x49/0x60 fs/namei.c:4453 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:162! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 PID: 6774 Comm: syz-executor.2 Not tainted 6.10.0-rc1-syzkaller-00021-ge0cce98fe279 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 RIP: 0010:filemap_unaccount_folio+0x80a/0xe40 mm/filemap.c:162 Code: 25 ff 0f 00 00 0f 84 f0 00 00 00 e8 c0 82 ca ff e9 6f f8 ff ff e8 b6 82 ca ff 4c 89 ef 48 c7 c6 60 95 d3 8b e8 57 47 14 00 90 <0f> 0b e8 9f 82 ca ff 4c 89 ef 48 c7 c6 a0 96 d3 8b e8 40 47 14 00 RSP: 0018:ffffc9000467f138 EFLAGS: 00010046 RAX: 2f0c742cf8ccad00 RBX: 0000000000000000 RCX: ffffc9000467ed03 RDX: 0000000000000002 RSI: ffffffff8bcacc00 RDI: ffffffff8c1ff200 RBP: 0000000000000001 R08: ffffffff8fad446f R09: 1ffffffff1f5a88d R10: dffffc0000000000 R11: fffffbfff1f5a88e R12: 1ffffd40003579b8 R13: ffffea0001abcdc0 R14: 1ffffd40003579b9 R15: ffffea0001abcdc8 FS: 0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8715ae56c6 CR3: 000000005cee8000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __filemap_remove_folio+0xc4/0x9e0 mm/filemap.c:231 filemap_remove_folio+0x109/0x2e0 mm/filemap.c:264 truncate_inode_folio+0x5d/0x70 mm/truncate.c:195 shmem_undo_range+0x45d/0x1df0 mm/shmem.c:1001 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29b/0xa60 mm/shmem.c:1242 evict+0x2a8/0x630 fs/inode.c:667 __dentry_kill+0x20d/0x630 fs/dcache.c:603 dput+0x19f/0x2b0 fs/dcache.c:845 __fput+0x68c/0x8b0 fs/file_table.c:430 task_work_run+0x24f/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa27/0x27e0 kernel/exit.c:874 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 get_signal+0x16a1/0x1740 kernel/signal.c:2909 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 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:0x7f0f9527cee9 Code: Unable to access opcode bytes at 0x7f0f9527cebf. RSP: 002b:00007f0f95f2f178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f0f953b4148 RCX: 00007f0f9527cee9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f0f953b4148 RBP: 00007f0f953b4140 R08: 00007f0f95f2f6c0 R09: 00007f0f95f2f6c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0f953b414c R13: 000000000000006e R14: 00007f0f954df9b0 R15: 00007f0f954dfa98 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:filemap_unaccount_folio+0x80a/0xe40 mm/filemap.c:162 Code: 25 ff 0f 00 00 0f 84 f0 00 00 00 e8 c0 82 ca ff e9 6f f8 ff ff e8 b6 82 ca ff 4c 89 ef 48 c7 c6 60 95 d3 8b e8 57 47 14 00 90 <0f> 0b e8 9f 82 ca ff 4c 89 ef 48 c7 c6 a0 96 d3 8b e8 40 47 14 00 RSP: 0018:ffffc9000467f138 EFLAGS: 00010046 RAX: 2f0c742cf8ccad00 RBX: 0000000000000000 RCX: ffffc9000467ed03 RDX: 0000000000000002 RSI: ffffffff8bcacc00 RDI: ffffffff8c1ff200 RBP: 0000000000000001 R08: ffffffff8fad446f R09: 1ffffffff1f5a88d R10: dffffc0000000000 R11: fffffbfff1f5a88e R12: 1ffffd40003579b8 R13: ffffea0001abcdc0 R14: 1ffffd40003579b9 R15: ffffea0001abcdc8 FS: 0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8715ae56c6 CR3: 000000005cee8000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400