From 428b9e758c30a95154f5ad0d974894ef9ae133d6 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Wed, 4 Jul 2012 14:23:35 +0100 Subject: [PATCH] Check whether gX86PagingMethod is NULL in arch_vm_translation_map_is_kernel_page_accessible. This means that the kernel debugger won't cause a recursive panic if a panic occurs before vm_init(). --- src/system/kernel/arch/x86/arch_vm_translation_map.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp index aa20762e29..af3d64b248 100644 --- a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp +++ b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp @@ -144,5 +144,8 @@ bool arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress, uint32 protection) { + if (!gX86PagingMethod) + return true; + return gX86PagingMethod->IsKernelPageAccessible(virtualAddress, protection); }