Skip to content

Commit

Permalink
Merge branch 'tip/x86/urgent' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/rostedt/linux-2.6-trace into x86/mm
  • Loading branch information
Ingo Molnar committed Feb 20, 2009
2 parents 7a5714e + 3c3e569 commit c9e1585
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ static noinline int spurious_fault(unsigned long error_code,
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
int ret;

/* Reserved-bit violation or user access to kernel space? */
if (error_code & (PF_USER | PF_RSVD))
Expand Down Expand Up @@ -672,7 +673,17 @@ static noinline int spurious_fault(unsigned long error_code,
if (!pte_present(*pte))
return 0;

return spurious_fault_check(error_code, pte);
ret = spurious_fault_check(error_code, pte);
if (!ret)
return 0;

/*
* Make sure we have permissions in PMD
* If not, then there's a bug in the page tables.
*/
ret = spurious_fault_check(error_code, (pte_t *) pmd);
WARN_ONCE(!ret, "PMD has incorrect permission bits\n");
return ret;
}

/*
Expand Down

0 comments on commit c9e1585

Please sign in to comment.