diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-24 15:13:59 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-24 15:13:59 -0400 |
commit | 83fe628e16d84efc8df2731bc403eae4e4f53801 (patch) | |
tree | 9a51c292235621d0f4f632c2a55ddb5a6ab582af /mm/mprotect.c | |
parent | 853a0231e057c04255a848f6998f84faaa635c58 (diff) | |
parent | 426f1af947c61dee48a9267f84bff227e503a547 (diff) |
Merge branch 'renesas/soc' into next/soc2
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index 5a688a2756be..f437d054c3bf 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -262,10 +262,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, | |||
262 | 262 | ||
263 | down_write(¤t->mm->mmap_sem); | 263 | down_write(¤t->mm->mmap_sem); |
264 | 264 | ||
265 | vma = find_vma_prev(current->mm, start, &prev); | 265 | vma = find_vma(current->mm, start); |
266 | error = -ENOMEM; | 266 | error = -ENOMEM; |
267 | if (!vma) | 267 | if (!vma) |
268 | goto out; | 268 | goto out; |
269 | prev = vma->vm_prev; | ||
269 | if (unlikely(grows & PROT_GROWSDOWN)) { | 270 | if (unlikely(grows & PROT_GROWSDOWN)) { |
270 | if (vma->vm_start >= end) | 271 | if (vma->vm_start >= end) |
271 | goto out; | 272 | goto out; |