Commit 55ee0843 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] get_user_pages PageReserved fix

From David Miler.

get_user_pages() needs to avoid running page_cache_get() against
PageReserved pages.  Things like video driver and audio driver
remap_page_range() mappings.
parent bedb8da7
......@@ -571,7 +571,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
i = -EFAULT;
goto out;
}
page_cache_get(pages[i]);
if (!PageReserved(pages[i]))
page_cache_get(pages[i]);
}
if (vmas)
vmas[i] = vma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment