|
@@ -1086,6 +1086,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
|
|
|
default:
|
|
default:
|
|
|
BUG();
|
|
BUG();
|
|
|
}
|
|
}
|
|
|
|
|
+ cond_resched();
|
|
|
}
|
|
}
|
|
|
if (pages) {
|
|
if (pages) {
|
|
|
pages[i] = page;
|
|
pages[i] = page;
|
|
@@ -2169,11 +2170,13 @@ static int do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
|
* after the next truncate_count read.
|
|
* after the next truncate_count read.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
- /* no page was available -- either SIGBUS or OOM */
|
|
|
|
|
- if (new_page == NOPAGE_SIGBUS)
|
|
|
|
|
|
|
+ /* no page was available -- either SIGBUS, OOM or REFAULT */
|
|
|
|
|
+ if (unlikely(new_page == NOPAGE_SIGBUS))
|
|
|
return VM_FAULT_SIGBUS;
|
|
return VM_FAULT_SIGBUS;
|
|
|
- if (new_page == NOPAGE_OOM)
|
|
|
|
|
|
|
+ else if (unlikely(new_page == NOPAGE_OOM))
|
|
|
return VM_FAULT_OOM;
|
|
return VM_FAULT_OOM;
|
|
|
|
|
+ else if (unlikely(new_page == NOPAGE_REFAULT))
|
|
|
|
|
+ return VM_FAULT_MINOR;
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* Should we do an early C-O-W break?
|
|
* Should we do an early C-O-W break?
|