diff options
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 35b92d81692f..f08bd31c1081 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -11,13 +11,14 @@ | |||
11 | #include <linux/mempolicy.h> | 11 | #include <linux/mempolicy.h> |
12 | #include <linux/rmap.h> | 12 | #include <linux/rmap.h> |
13 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
14 | #include <linux/sched/mm.h> | ||
14 | #include <linux/swapops.h> | 15 | #include <linux/swapops.h> |
15 | #include <linux/mmu_notifier.h> | 16 | #include <linux/mmu_notifier.h> |
16 | #include <linux/page_idle.h> | 17 | #include <linux/page_idle.h> |
17 | #include <linux/shmem_fs.h> | 18 | #include <linux/shmem_fs.h> |
18 | 19 | ||
19 | #include <asm/elf.h> | 20 | #include <asm/elf.h> |
20 | #include <asm/uaccess.h> | 21 | #include <linux/uaccess.h> |
21 | #include <asm/tlbflush.h> | 22 | #include <asm/tlbflush.h> |
22 | #include "internal.h" | 23 | #include "internal.h" |
23 | 24 | ||
@@ -167,7 +168,7 @@ static void *m_start(struct seq_file *m, loff_t *ppos) | |||
167 | return ERR_PTR(-ESRCH); | 168 | return ERR_PTR(-ESRCH); |
168 | 169 | ||
169 | mm = priv->mm; | 170 | mm = priv->mm; |
170 | if (!mm || !atomic_inc_not_zero(&mm->mm_users)) | 171 | if (!mm || !mmget_not_zero(mm)) |
171 | return NULL; | 172 | return NULL; |
172 | 173 | ||
173 | down_read(&mm->mmap_sem); | 174 | down_read(&mm->mmap_sem); |
@@ -1352,7 +1353,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
1352 | unsigned long end_vaddr; | 1353 | unsigned long end_vaddr; |
1353 | int ret = 0, copied = 0; | 1354 | int ret = 0, copied = 0; |
1354 | 1355 | ||
1355 | if (!mm || !atomic_inc_not_zero(&mm->mm_users)) | 1356 | if (!mm || !mmget_not_zero(mm)) |
1356 | goto out; | 1357 | goto out; |
1357 | 1358 | ||
1358 | ret = -EINVAL; | 1359 | ret = -EINVAL; |
@@ -1588,6 +1589,7 @@ static int gather_pte_stats(pmd_t *pmd, unsigned long addr, | |||
1588 | 1589 | ||
1589 | } while (pte++, addr += PAGE_SIZE, addr != end); | 1590 | } while (pte++, addr += PAGE_SIZE, addr != end); |
1590 | pte_unmap_unlock(orig_pte, ptl); | 1591 | pte_unmap_unlock(orig_pte, ptl); |
1592 | cond_resched(); | ||
1591 | return 0; | 1593 | return 0; |
1592 | } | 1594 | } |
1593 | #ifdef CONFIG_HUGETLB_PAGE | 1595 | #ifdef CONFIG_HUGETLB_PAGE |