diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-02-07 08:44:11 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-02-07 08:44:26 +0100 |
commit | c7f9a6f377fa64e5a74f8c128d4349765c28fab1 (patch) | |
tree | e71eaf08c5f9179d6fd6c7e08d8539358dc76ad1 /mm/mlock.c | |
parent | fe4b04fa31a6dcf4358aa84cf81e5a7fd079469b (diff) | |
parent | 8dbdea8444d303a772bceb1ba963f0e3273bfc5e (diff) |
Merge branch 'linus' into perf/core
Merge reason: Pick up perf fixes that are now upstream
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/mlock.c')
-rw-r--r-- | mm/mlock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 13e81ee8be9..c3924c7f00b 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -178,6 +178,13 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma, if ((vma->vm_flags & (VM_WRITE | VM_SHARED)) == VM_WRITE) gup_flags |= FOLL_WRITE; + /* + * We want mlock to succeed for regions that have any permissions + * other than PROT_NONE. + */ + if (vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) + gup_flags |= FOLL_FORCE; + if (vma->vm_flags & VM_LOCKED) gup_flags |= FOLL_MLOCK; |