aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorNamhoon Kim <namhoonk@cs.unc.edu>2016-09-29 15:05:48 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2016-09-29 15:05:48 -0400
commit0e6a44a09800be09924707025646b3f3e3700306 (patch)
treecdfb12473efd82a6935e84b5225c17c54fcd4793 /mm/memory.c
parenta75060efea2b2ce6e5bf8ab540c123de42395755 (diff)
9/29/2016 find_get_page_readonly checks SCHED_LITMUS
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 22e037e3364e..1fc358bec6d5 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2231,15 +2231,24 @@ static int wp_page_shared(struct mm_struct *mm, struct vm_area_struct *vma,
2231 * read-only shared pages can get COWed by 2231 * read-only shared pages can get COWed by
2232 * get_user_pages(.write=1, .force=1). 2232 * get_user_pages(.write=1, .force=1).
2233 */ 2233 */
2234 if (vma->vm_ops && vma->vm_ops->page_mkwrite) { 2234// if (vma->vm_ops && vma->vm_ops->page_mkwrite) {
2235 {
2235 int tmp; 2236 int tmp;
2236 2237
2237 pte_unmap_unlock(page_table, ptl); 2238 pte_unmap_unlock(page_table, ptl);
2238 tmp = do_page_mkwrite(vma, old_page, address); 2239
2239 if (unlikely(!tmp || (tmp & 2240 if (page_write_fault_retry(old_page)) {
2240 (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))) {
2241 page_cache_release(old_page); 2241 page_cache_release(old_page);
2242 return tmp; 2242 return 0;
2243 }
2244
2245 if (vma->vm_ops && vma->vm_ops->page_mkwrite) {
2246 tmp = do_page_mkwrite(vma, old_page, address);
2247 if (unlikely(!tmp || (tmp &
2248 (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))) {
2249 page_cache_release(old_page);
2250 return tmp;
2251 }
2243 } 2252 }
2244 /* 2253 /*
2245 * Since we dropped the lock we need to revalidate 2254 * Since we dropped the lock we need to revalidate