summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i386/i386/trap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 9d4d43d..f1fe634 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -217,9 +217,9 @@ dump_ss(regs);
goto badtrap;
}
} else {
- assert(thread);
- map = thread->task->map;
- if (map == kernel_map) {
+ if (thread)
+ map = thread->task->map;
+ if (!thread || map == kernel_map) {
printf("kernel page fault at %08x:\n", subcode);
dump_ss(regs);
panic("kernel thread accessed user space!\n");