Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1149
b: refs/heads/master
c: 3b9ba4d
h: refs/heads/master
i:
  1147: 3fb2eb9
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed May 17, 2005
1 parent c209880 commit 508a384
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6b8d4778c04148729cc0b0dcd335a4411c44276
refs/heads/master: 3b9ba4d5e23fcab24dd4d2e46dce11f5863869b4
11 changes: 9 additions & 2 deletions trunk/arch/x86_64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,

/*
* Handle a fault on the vmalloc or module mapping area
*
* This assumes no large pages in there.
*/
static int vmalloc_fault(unsigned long address)
{
Expand Down Expand Up @@ -272,7 +274,10 @@ static int vmalloc_fault(unsigned long address)
if (!pte_present(*pte_ref))
return -1;
pte = pte_offset_kernel(pmd, address);
if (!pte_present(*pte) || pte_page(*pte) != pte_page(*pte_ref))
/* Don't use pte_page here, because the mappings can point
outside mem_map, and the NUMA hash lookup cannot handle
that. */
if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref))
BUG();
__flush_tlb_all();
return 0;
Expand Down Expand Up @@ -346,7 +351,9 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
* protection error (error_code & 1) == 0.
*/
if (unlikely(address >= TASK_SIZE)) {
if (!(error_code & 5)) {
if (!(error_code & 5) &&
((address >= VMALLOC_START && address < VMALLOC_END) ||
(address >= MODULES_VADDR && address < MODULES_END))) {
if (vmalloc_fault(address) < 0)
goto bad_area_nosemaphore;
return;
Expand Down

0 comments on commit 508a384

Please sign in to comment.