------------[ cut here ]------------ kernel BUG at [] mm/page_table_check.c:142! Kernel BUG [#1] Modules linked in: CPU: 0 UID: 0 PID: 9661 Comm: syz.2.1520 Not tainted syzkaller #0 PREEMPT Hardware name: riscv-virtio,qemu (DT) epc : __page_table_check_zero+0x396/0x544 mm/page_table_check.c:142 ra : __page_table_check_zero+0x396/0x544 mm/page_table_check.c:142 epc : ffffffff80c4e2ce ra : ffffffff80c4e2ce sp : ffff8f8000207360 gp : ffffffff8a229d40 tp : ffffaf80194c3500 t0 : ffff8f8000207300 t1 : fffff5ef027b4809 t2 : 1ffff1f000040eec s0 : ffff8f80002073d0 s1 : ffffaf8013da4048 a0 : 0000000000000005 a1 : 0000000000000000 a2 : 0000000000000002 a3 : ffffffff80c4e2ce a4 : 0000000000000000 a5 : ffffaf80194c4500 a6 : 0000000000000003 a7 : ffffaf8013da404b s2 : 0000000000000001 s3 : 0000000000000000 s4 : ffffaf8013da4000 s5 : dfffffff00000000 s6 : 00000000000bd400 s7 : 0000000000000200 s8 : 0000000000000009 s9 : 0000000000007fff s10: fffffffef1468db0 s11: ffffffff8a346d80 t3 : 0000000000000001 t4 : fffff5ef027b4809 t5 : fffff5ef027b480a t6 : 0000000000000002 ssp : 0000000000000000 status: 0000000200000120 badaddr: ffffffff80c4e2ce cause: 0000000000000003 [] __page_table_check_zero+0x396/0x544 mm/page_table_check.c:142 [] page_table_check_free include/linux/page_table_check.h:46 [inline] [] __free_pages_prepare mm/page_alloc.c:1434 [inline] [] free_unref_folios+0xa58/0x1ef4 mm/page_alloc.c:3040 [] folios_put_refs+0x41c/0x61c mm/swap.c:1002 [] free_pages_and_swap_cache+0x29c/0x480 mm/swap_state.c:426 [] __tlb_batch_free_encoded_pages+0xe4/0x25c mm/mmu_gather.c:138 [] tlb_batch_pages_flush mm/mmu_gather.c:151 [inline] [] tlb_flush_mmu_free mm/mmu_gather.c:398 [inline] [] tlb_flush_mmu mm/mmu_gather.c:405 [inline] [] tlb_finish_mmu+0x188/0x824 mm/mmu_gather.c:530 [] exit_mmap+0x416/0xccc mm/mmap.c:1315 [] __mmput+0x106/0x3d0 kernel/fork.c:1175 [] mmput+0x74/0x88 kernel/fork.c:1198 [] exit_mm kernel/exit.c:581 [inline] [] do_exit+0x802/0x2ac4 kernel/exit.c:964 [] __do_sys_exit kernel/exit.c:1085 [inline] [] __se_sys_exit kernel/exit.c:1083 [inline] [] __riscv_sys_exit+0x48/0x54 kernel/exit.c:1083 [] syscall_handler+0x92/0x114 arch/riscv/include/asm/syscall.h:112 [] do_trap_ecall_u+0x402/0x680 arch/riscv/kernel/traps.c:344 [] handle_exception+0x15e/0x16a arch/riscv/kernel/entry.S:232 Code: a980 8526 c0ef e7bf 8a2a b791 e097 ff8c 80e7 a860 (9002) e097 ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: a980 fsd fs0,16(a1) 2: 8526 mv a0,s1 4: e7bfc0ef jal 0xffffffffffffce7e 8: 8a2a mv s4,a0 a: b791 j 0xffffffffffffff4e c: ff8ce097 auipc ra,0xff8ce 10: a86080e7 jalr -1402(ra) # 0xff8cda92 * 14: 9002 ebreak <-- trapping instruction 16: 97e0 .short 0xe097