From: Ben Pfaff Date: Thu, 2 Sep 2004 20:59:40 +0000 (+0000) Subject: Activate the base page directory if pagedir_activate() is passed a X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ea9a3336d9bfe8df53d5d4f27613e28bc294732;p=pintos-anon Activate the base page directory if pagedir_activate() is passed a null pointer. --- diff --git a/src/threads/paging.c b/src/threads/paging.c index 587813c..2ae78c3 100644 --- a/src/threads/paging.c +++ b/src/threads/paging.c @@ -220,5 +220,7 @@ pagedir_next (uint32_t *pd, void **upage) void pagedir_activate (uint32_t *pd) { + if (pd == NULL) + pd = base_page_dir; asm volatile ("movl %0,%%cr3" :: "r" (vtop (pd))); }