aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-20 12:51:43 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-20 12:51:43 -0500
commitc9e1585b1b7e36a72181f2c59c2abfd476512e93 (patch)
treee293a9a316a220a1a9c40ea29a718cd49a4ac8df
parent7a5714e0186030676d79a7b4b9830c8e45c3b0a1 (diff)
parent3c3e5694add02e665bbbd0fecfbbdcc0b903097a (diff)
Merge branch 'tip/x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into x86/mm
-rw-r--r--arch/x86/mm/fault.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 29644175490f..e4b9fc5001c6 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -645,6 +645,7 @@ static noinline int spurious_fault(unsigned long error_code,
645 pud_t *pud; 645 pud_t *pud;
646 pmd_t *pmd; 646 pmd_t *pmd;
647 pte_t *pte; 647 pte_t *pte;
648 int ret;
648 649
649 /* Reserved-bit violation or user access to kernel space? */ 650 /* Reserved-bit violation or user access to kernel space? */
650 if (error_code & (PF_USER | PF_RSVD)) 651 if (error_code & (PF_USER | PF_RSVD))
@@ -672,7 +673,17 @@ static noinline int spurious_fault(unsigned long error_code,
672 if (!pte_present(*pte)) 673 if (!pte_present(*pte))
673 return 0; 674 return 0;
674 675
675 return spurious_fault_check(error_code, pte); 676 ret = spurious_fault_check(error_code, pte);
677 if (!ret)
678 return 0;
679
680 /*
681 * Make sure we have permissions in PMD
682 * If not, then there's a bug in the page tables.
683 */
684 ret = spurious_fault_check(error_code, (pte_t *) pmd);
685 WARN_ONCE(!ret, "PMD has incorrect permission bits\n");
686 return ret;
676} 687}
677 688
678/* 689/*