diff options
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 07376a4a3ed1..9bd8be1d235c 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -689,6 +689,8 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, down_read(¤t->mm->mmap_sem); ret = get_user_pages(current, current->mm, uaddr, pagecount, 1, 0, pages, NULL); + up_read(¤t->mm->mmap_sem); + if (ret < 0) goto out_free; @@ -737,7 +739,6 @@ out_pages: page_cache_release(page); } out_free: - up_read(¤t->mm->mmap_sem); kfree(pages); out_mm: mmput(mm); |