From 3ea9a3336d9bfe8df53d5d4f27613e28bc294732 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 2 Sep 2004 20:59:40 +0000 Subject: [PATCH] Activate the base page directory if pagedir_activate() is passed a null pointer. --- src/threads/paging.c | 2 ++ 1 file changed, 2 insertions(+) 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))); } -- 2.30.2