Activate the base page directory if pagedir_activate() is passed a
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 2 Sep 2004 20:59:40 +0000 (20:59 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 2 Sep 2004 20:59:40 +0000 (20:59 +0000)
null pointer.

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)));
 }