Activate the base page directory if pagedir_activate() is passed a
[pintos-anon] / src / threads / paging.c
index 587813cb3c3707071316d9926979873a98d8f91e..2ae78c3c456cff3a63ae1ddf913db847864e2965 100644 (file)
@@ -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)));
 }