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,6 +571,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, ...@@ -571,6 +571,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
i = -EFAULT; i = -EFAULT;
goto out; goto out;
} }
if (!PageReserved(pages[i]))
page_cache_get(pages[i]); page_cache_get(pages[i]);
} }
if (vmas) if (vmas)
......
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