From 2a7d90df161795978d324a8356264dc7971d5385 Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Tue, 27 Jul 2010 16:06:28 +0800 Subject: [PATCH] --- yaml --- r: 212059 b: refs/heads/master c: 660a293ea9be709b893d371fbc0328fcca33c33a h: refs/heads/master i: 212057: 8d6ffaad9a1c0c2a22ddcfa554ee1675a0ddc6e0 212055: 7322e17090c54407188b5da10486e3ab232c9d83 v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/fault.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 054e041392f5..959a1dff11bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b861528a8012e7bc4d1f7bae07395b225331477 +refs/heads/master: 660a293ea9be709b893d371fbc0328fcca33c33a diff --git a/trunk/arch/x86/mm/fault.c b/trunk/arch/x86/mm/fault.c index 51f7ee71d6c7..caec22906d7c 100644 --- a/trunk/arch/x86/mm/fault.c +++ b/trunk/arch/x86/mm/fault.c @@ -872,8 +872,14 @@ spurious_fault(unsigned long error_code, unsigned long address) if (pmd_large(*pmd)) return spurious_fault_check(error_code, (pte_t *) pmd); + /* + * Note: don't use pte_present() here, since it returns true + * if the _PAGE_PROTNONE bit is set. However, this aliases the + * _PAGE_GLOBAL bit, which for kernel pages give false positives + * when CONFIG_DEBUG_PAGEALLOC is used. + */ pte = pte_offset_kernel(pmd, address); - if (!pte_present(*pte)) + if (!(pte_flags(*pte) & _PAGE_PRESENT)) return 0; ret = spurious_fault_check(error_code, pte);