try_to_shrink_lruvec+0x612/0x9b0 mm/vmscan.c:4778 shrink_one+0x3e3/0x7b0 mm/vmscan.c:4816 shrink_many mm/vmscan.c:4879 [inline] lru_gen_shrink_node mm/vmscan.c:4957 [inline] shrink_node+0xb15/0x3ad0 mm/vmscan.c:5937 kswapd_shrink_node mm/vmscan.c:6765 [inline] balance_pgdat+0xc19/0x18f0 mm/vmscan.c:6957 kswapd+0x5ea/0xbf0 mm/vmscan.c:7226 ------------[ cut here ]------------ kernel BUG at mm/z3fold.c:1293! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 9522 Comm: syz.8.5617 Not tainted 6.12.0-rc5-syzkaller-00005-ge42b1a9a2557 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:z3fold_page_migrate+0xea1/0x12d0 mm/z3fold.c:1293 Code: b0 93 ff 48 c7 c6 20 4e 5d 8b 48 89 ef e8 17 6b d9 ff 90 0f 0b e8 cf b0 93 ff 48 c7 c6 80 4e 5d 8b 48 89 ef e8 00 6b d9 ff 90 <0f> 0b e8 b8 b0 93 ff 49 8b 6c 24 08 31 ff 48 89 eb 83 e3 01 48 89 RSP: 0018:ffffc90003e16948 EFLAGS: 00010246 RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc900317a2000 RDX: 0000000000040000 RSI: ffffffff81f8f530 RDI: ffff88801266a884 RBP: ffffea0001ab0800 R08: 0000000000000001 R09: fffffbfff2d323b0 R10: ffffffff96991d87 R11: 0000000000000477 R12: ffffea0001d59280 R13: ffffffff8b5d5660 R14: ffffea0001ab0828 R15: ffffea0001ab0818 FS: 0000000000000000(0000) GS:ffff88802b400000(0063) knlGS:00000000f56d6b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00000000578a6990 CR3: 0000000072f66000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: move_to_new_folio+0x449/0x700 mm/migrate.c:1077 migrate_folio_move mm/migrate.c:1366 [inline] migrate_pages_batch+0x206a/0x31b0 mm/migrate.c:1897 migrate_pages_sync+0x4c9/0x8f0 mm/migrate.c:1990 migrate_pages+0x19ee/0x21f0 mm/migrate.c:2072 compact_zone+0x1f68/0x4280 mm/compaction.c:2641 compact_zone_order+0x16b/0x240 mm/compaction.c:2776 try_to_compact_pages+0x358/0xa80 mm/compaction.c:2837 __alloc_pages_direct_compact+0x138/0x590 mm/page_alloc.c:3666 __alloc_pages_slowpath mm/page_alloc.c:4369 [inline] __alloc_pages_noprof+0xbef/0x25a0 mm/page_alloc.c:4746 __folio_alloc_noprof+0x11/0x1a0 mm/page_alloc.c:4765 alloc_buddy_hugetlb_folio.isra.0+0xbe/0x330 mm/hugetlb.c:2024 alloc_fresh_hugetlb_folio+0x25c/0x300 mm/hugetlb.c:2095 alloc_surplus_hugetlb_folio+0x12b/0x300 mm/hugetlb.c:2313 alloc_buddy_hugetlb_folio_with_mpol mm/hugetlb.c:2388 [inline] alloc_hugetlb_folio+0xd7d/0x14d0 mm/hugetlb.c:3045 hugetlb_no_page mm/hugetlb.c:6122 [inline] hugetlb_fault+0x1e36/0x2fa0 mm/hugetlb.c:6360 handle_mm_fault+0x930/0xaa0 mm/memory.c:6064 do_user_addr_fault+0x7a3/0x13f0 arch/x86/mm/fault.c:1389 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0010:fault_in_readable+0x160/0x200 mm/gup.c:2235 Code: 42 e8 45 31 f6 e8 70 36 ba ff 48 39 eb 75 13 eb 2e e8 64 36 ba ff 48 81 c3 00 10 00 00 48 39 eb 74 1d e8 53 36 ba ff 45 89 f7 <8a> 03 31 ff 44 89 fe 88 44 24 28 e8 80 38 ba ff 45 85 ff 74 d2 e8 RSP: 0018:ffffc90003e17b08 EFLAGS: 00050246 RAX: 0000000000040000 RBX: 0000000020800000 RCX: ffffc900317a2000 RDX: 0000000000040000 RSI: ffffffff81d26f9d RDI: 0000000000000005 RBP: 0000000020801000 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000199000 R13: 0000000020667240 R14: 0000000000000000 R15: 0000000000000000 fault_in_iov_iter_readable+0x101/0x2c0 lib/iov_iter.c:94 generic_perform_write+0x21b/0x920 mm/filemap.c:4044 shmem_file_write_iter+0x10e/0x140 mm/shmem.c:3216 new_sync_write fs/read_write.c:590 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:683 ksys_write+0x12f/0x260 fs/read_write.c:736 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf73ee579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f56d655c EFLAGS: 00000296 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020000240 RDX: 000000000208e24b RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:z3fold_page_migrate+0xea1/0x12d0 mm/z3fold.c:1293 Code: b0 93 ff 48 c7 c6 20 4e 5d 8b 48 89 ef e8 17 6b d9 ff 90 0f 0b e8 cf b0 93 ff 48 c7 c6 80 4e 5d 8b 48 89 ef e8 00 6b d9 ff 90 <0f> 0b e8 b8 b0 93 ff 49 8b 6c 24 08 31 ff 48 89 eb 83 e3 01 48 89 RSP: 0018:ffffc90003e16948 EFLAGS: 00010246 RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc900317a2000 RDX: 0000000000040000 RSI: ffffffff81f8f530 RDI: ffff88801266a884 RBP: ffffea0001ab0800 R08: 0000000000000001 R09: fffffbfff2d323b0 R10: ffffffff96991d87 R11: 0000000000000477 R12: ffffea0001d59280 R13: ffffffff8b5d5660 R14: ffffea0001ab0828 R15: ffffea0001ab0818 FS: 0000000000000000(0000) GS:ffff88802b500000(0063) knlGS:00000000f56d6b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000002f41eff8 CR3: 0000000072f66000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 42 e8 45 31 f6 e8 rex.X call 0xe8f6314b 6: 70 36 jo 0x3e 8: ba ff 48 39 eb mov $0xeb3948ff,%edx d: 75 13 jne 0x22 f: eb 2e jmp 0x3f 11: e8 64 36 ba ff call 0xffba367a 16: 48 81 c3 00 10 00 00 add $0x1000,%rbx 1d: 48 39 eb cmp %rbp,%rbx 20: 74 1d je 0x3f 22: e8 53 36 ba ff call 0xffba367a 27: 45 89 f7 mov %r14d,%r15d * 2a: 8a 03 mov (%rbx),%al <-- trapping instruction 2c: 31 ff xor %edi,%edi 2e: 44 89 fe mov %r15d,%esi 31: 88 44 24 28 mov %al,0x28(%rsp) 35: e8 80 38 ba ff call 0xffba38ba 3a: 45 85 ff test %r15d,%r15d 3d: 74 d2 je 0x11 3f: e8 .byte 0xe8