]> Zhao Yanbai Git Server - kernel.git/commitdiff
fix bug in do_no_page
authorAceVest <zhaoyanbai@126.com>
Fri, 18 Jul 2014 16:27:37 +0000 (00:27 +0800)
committeracevest <zhaoyanbai@126.com>
Wed, 3 Nov 2021 02:45:38 +0000 (10:45 +0800)
mm/page.c

index ab4d8d9b508e48ca2191612a0b89b4004fb35c61..8037c17e6686b80f70b93bf99f2cc9897e1c375d 100644 (file)
--- a/mm/page.c
+++ b/mm/page.c
 #include <printk.h>
 #include <mm.h>
 
-void    do_no_page(void *addr)
+void do_no_page(void *addr)
 {
     pde_t *pde = (pde_t *)current->cr3;
     pte_t *pte;
     unsigned long page = alloc_one_page(0);
+    page = va2pa(page);
     if(page == 0)
         panic("failed alloc page");