task_mmu.c (e98bdb3059cbf2b1cd4261e126b08429f64466c3) task_mmu.c (388f79345502232d335467e8fa6f8e55a18844e1)
1#include <linux/mm.h>
2#include <linux/vmacache.h>
3#include <linux/hugetlb.h>
4#include <linux/huge_mm.h>
5#include <linux/mount.h>
6#include <linux/seq_file.h>
7#include <linux/highmem.h>
8#include <linux/ptrace.h>

--- 153 unchanged lines hidden (view full) ---

162 if (last_addr == -1UL)
163 return NULL;
164
165 priv->task = get_proc_task(priv->inode);
166 if (!priv->task)
167 return ERR_PTR(-ESRCH);
168
169 mm = priv->mm;
1#include <linux/mm.h>
2#include <linux/vmacache.h>
3#include <linux/hugetlb.h>
4#include <linux/huge_mm.h>
5#include <linux/mount.h>
6#include <linux/seq_file.h>
7#include <linux/highmem.h>
8#include <linux/ptrace.h>

--- 153 unchanged lines hidden (view full) ---

162 if (last_addr == -1UL)
163 return NULL;
164
165 priv->task = get_proc_task(priv->inode);
166 if (!priv->task)
167 return ERR_PTR(-ESRCH);
168
169 mm = priv->mm;
170 if (!mm || !atomic_inc_not_zero(&mm->mm_users))
170 if (!mm || !mmget_not_zero(mm))
171 return NULL;
172
173 down_read(&mm->mmap_sem);
174 hold_task_mempolicy(priv);
175 priv->tail_vma = get_gate_vma(mm);
176
177 if (last_addr) {
178 vma = find_vma(mm, last_addr - 1);

--- 1168 unchanged lines hidden (view full) ---

1347 struct pagemapread pm;
1348 struct mm_walk pagemap_walk = {};
1349 unsigned long src;
1350 unsigned long svpfn;
1351 unsigned long start_vaddr;
1352 unsigned long end_vaddr;
1353 int ret = 0, copied = 0;
1354
171 return NULL;
172
173 down_read(&mm->mmap_sem);
174 hold_task_mempolicy(priv);
175 priv->tail_vma = get_gate_vma(mm);
176
177 if (last_addr) {
178 vma = find_vma(mm, last_addr - 1);

--- 1168 unchanged lines hidden (view full) ---

1347 struct pagemapread pm;
1348 struct mm_walk pagemap_walk = {};
1349 unsigned long src;
1350 unsigned long svpfn;
1351 unsigned long start_vaddr;
1352 unsigned long end_vaddr;
1353 int ret = 0, copied = 0;
1354
1355 if (!mm || !atomic_inc_not_zero(&mm->mm_users))
1355 if (!mm || !mmget_not_zero(mm))
1356 goto out;
1357
1358 ret = -EINVAL;
1359 /* file position must be aligned */
1360 if ((*ppos % PM_ENTRY_BYTES) || (count % PM_ENTRY_BYTES))
1361 goto out_mm;
1362
1363 ret = 0;

--- 400 unchanged lines hidden ---
1356 goto out;
1357
1358 ret = -EINVAL;
1359 /* file position must be aligned */
1360 if ((*ppos % PM_ENTRY_BYTES) || (count % PM_ENTRY_BYTES))
1361 goto out_mm;
1362
1363 ret = 0;

--- 400 unchanged lines hidden ---