Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47883
b: refs/heads/master
c: 22cd25e
h: refs/heads/master
i:
  47881: 0294e13
  47879: 51efb96
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed Feb 12, 2007
1 parent 934f8c1 commit 691c9f3
Show file tree
Hide file tree
Showing 3 changed files with 6 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: e0dc0d8f4a327d033bfb63d43f113d5f31d11b3c
refs/heads/master: 22cd25ed31bbf849acaa06ab220dc4f526153f13
1 change: 1 addition & 0 deletions trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ static inline int page_mapped(struct page *page)
*/
#define NOPFN_SIGBUS ((unsigned long) -1)
#define NOPFN_OOM ((unsigned long) -2)
#define NOPFN_REFAULT ((unsigned long) -3)

/*
* Different kinds of faults, as returned by handle_mm_fault().
Expand Down
6 changes: 4 additions & 2 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2355,10 +2355,12 @@ static noinline int do_no_pfn(struct mm_struct *mm, struct vm_area_struct *vma,
BUG_ON(is_cow_mapping(vma->vm_flags));

pfn = vma->vm_ops->nopfn(vma, address & PAGE_MASK);
if (pfn == NOPFN_OOM)
if (unlikely(pfn == NOPFN_OOM))
return VM_FAULT_OOM;
if (pfn == NOPFN_SIGBUS)
else if (unlikely(pfn == NOPFN_SIGBUS))
return VM_FAULT_SIGBUS;
else if (unlikely(pfn == NOPFN_REFAULT))
return VM_FAULT_MINOR;

page_table = pte_offset_map_lock(mm, pmd, address, &ptl);

Expand Down

0 comments on commit 691c9f3

Please sign in to comment.