Check to see if pte is a null pointer and perform dereference only
if that is not the case.
* i386/intel/pmap.c (pte): Check if it is a null pointer.
---
i386/intel/pmap.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index c1eca6e..283992e 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1567,8 +1567,9 @@ void pmap_page_protect(phys, prot)
/*
* Remove the mapping, collecting any modify bits.
*/
- if (*pte & INTEL_PTE_WIRED)
- panic("pmap_remove_all removing a wired page");
+ if (pte != NULL)
+ if (*pte & INTEL_PTE_WIRED)
+ panic("pmap_remove_all removing a wired
page");
{
register int i = ptes_per_vm_page;
--
1.8.1.4