Ticket #11107: Check-if-gARMPagingMethod-is-null.patch

File Check-if-gARMPagingMethod-is-null.patch, 968 bytes (added by arvindsraj, 10 years ago)
  • src/system/kernel/arch/arm/arch_vm_translation_map.cpp

    From 33290dc8ef50f2e767f4c2f3e509cf97781976e6 Mon Sep 17 00:00:00 2001
    From: Arvind S Raj <sraj.arvind@gmail.com>
    Date: Thu, 7 Aug 2014 17:22:48 +0530
    Subject: [PATCH] Check if gARMPagingMethod is null in
     arch_vm_translation_map_is_kernel_page_accessible. Fix borrowed from
     x86(commit 428b9e758c30a95154f5ad0d974894ef9ae133d6).
    
    ---
     src/system/kernel/arch/arm/arch_vm_translation_map.cpp | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/src/system/kernel/arch/arm/arch_vm_translation_map.cpp b/src/system/kernel/arch/arm/arch_vm_translation_map.cpp
    index faad4bf..6fc4ba1 100644
    a b bool  
    145145arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress,
    146146    uint32 protection)
    147147{
     148    if(!gARMPagingMethod)
     149        return true;
     150
    148151    return gARMPagingMethod->IsKernelPageAccessible(virtualAddress, protection);
    149152}