Kernel bug: kernel BUG in z3fold_page_migrate
Subsystem: mm
Status: open

Crash report:
 compact_node+0x2de/0x460 mm/compaction.c:2932
 kcompactd+0x6cd/0x14b0 mm/compaction.c:3226
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
------------[ cut here ]------------
kernel BUG at mm/z3fold.c:1293!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 29 Comm: kcompactd1 Not tainted 6.14.0-rc4-syzkaller-00212-g276f98efb64a #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+0xc22/0x1170 mm/z3fold.c:1293
Code: ff 48 89 ef 48 c7 c6 40 30 38 8c e8 b8 1a d8 ff 90 0f 0b e8 50 80 8d ff 48 8b 7c 24 10 48 c7 c6 a0 30 38 8c e8 9f 1a d8 ff 90 <0f> 0b 48 85 db 0f 85 83 00 00 00 0f 1f 44 00 00 e8 29 80 8d ff e9
RSP: 0000:ffffc90000506cb8 EFLAGS: 00010246
RAX: da127b59bf3df600 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8c2aa4a0 RDI: 0000000000000001
RBP: ffffea00010347c0 R08: ffffffff903cef77 R09: 1ffffffff2079dee
R10: dffffc0000000000 R11: fffffbfff2079def R12: dffffc0000000000
R13: ffffffff8c382ea8 R14: 04fff00000010001 R15: 1ffffd40002068f8
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f530c7e0000 CR3: 0000000042200000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 move_to_new_folio+0x9a5/0xc20 mm/migrate.c:1071
 migrate_folio_move mm/migrate.c:1360 [inline]
 migrate_folios_move mm/migrate.c:1712 [inline]
 migrate_pages_batch+0x1e84/0x30b0 mm/migrate.c:1959
 migrate_pages_sync mm/migrate.c:2016 [inline]
 migrate_pages+0x2701/0x3680 mm/migrate.c:2098
 compact_zone+0x33d5/0x4ae0 mm/compaction.c:2663
 compact_node+0x2de/0x460 mm/compaction.c:2932
 kcompactd+0x6cd/0x14b0 mm/compaction.c:3226
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:z3fold_page_migrate+0xc22/0x1170 mm/z3fold.c:1293
Code: ff 48 89 ef 48 c7 c6 40 30 38 8c e8 b8 1a d8 ff 90 0f 0b e8 50 80 8d ff 48 8b 7c 24 10 48 c7 c6 a0 30 38 8c e8 9f 1a d8 ff 90 <0f> 0b 48 85 db 0f 85 83 00 00 00 0f 1f 44 00 00 e8 29 80 8d ff e9
RSP: 0000:ffffc90000506cb8 EFLAGS: 00010246
RAX: da127b59bf3df600 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8c2aa4a0 RDI: 0000000000000001
RBP: ffffea00010347c0 R08: ffffffff903cef77 R09: 1ffffffff2079dee
R10: dffffc0000000000 R11: fffffbfff2079def R12: dffffc0000000000
R13: ffffffff8c382ea8 R14: 04fff00000010001 R15: 1ffffd40002068f8
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c008dff000 CR3: 0000000012014000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400