diff options
author | Vandana Salve <vsalve@nvidia.com> | 2014-06-25 20:31:37 +0530 |
---|---|---|
committer | Harshada Kale <hkale@nvidia.com> | 2014-06-26 09:35:12 -0700 |
commit | 41b5e73ff878e7c1629f0ad8707cbc4c5c128f7b (patch) | |
tree | 3ff6a9959c6044f590318150d094890f7eb47e9a /fs | |
parent | 41f89c9eb5f6e8b492f514a80f703159b20e4836 (diff) |
fs/proc/task_mmu.c: hold read lock on mm->mmap_sem for get_user_pages
Hold read lock on mm->mmap_sem for calling get_user_pages
bug 1525355
Change-Id: I4a1b607c9f745ea938d7f051e76d67425eccd09d
Signed-off-by: Vandana Salve <vsalve@nvidia.com>
Reviewed-on: http://git-master/r/428367
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/task_mmu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index db17f98bc564..a9e45c7a6c59 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -158,8 +158,10 @@ static void seq_print_vma_name(struct seq_file *m, struct vm_area_struct *vma) long pages_pinned; struct page *page; + down_read(¤t->mm->mmap_sem); pages_pinned = get_user_pages(current, mm, page_start_vaddr, 1, 0, 0, &page, NULL); + up_read(¤t->mm->mmap_sem); if (pages_pinned < 1) { seq_puts(m, "<fault>]"); return; |