Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309736
b: refs/heads/master
c: e7dcd99
h: refs/heads/master
v: v3
  • Loading branch information
Cong Wang authored and Linus Torvalds committed Jun 1, 2012
1 parent a069790 commit 131dc50
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b409e578d9a4ec95913e06d8fea2a33f1754ea69
refs/heads/master: e7dcd9990e42ccfc798d4eb55e2dbf9d7d434c6b
7 changes: 1 addition & 6 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ static int proc_root_link(struct dentry *dentry, struct path *path)
return result;
}

struct mm_struct *mm_for_maps(struct task_struct *task)
{
return mm_access(task, PTRACE_MODE_READ);
}

static int proc_pid_cmdline(struct task_struct *task, char * buffer)
{
int res = 0;
Expand Down Expand Up @@ -243,7 +238,7 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)

static int proc_pid_auxv(struct task_struct *task, char *buffer)
{
struct mm_struct *mm = mm_for_maps(task);
struct mm_struct *mm = mm_access(task, PTRACE_MODE_READ);
int res = PTR_ERR(mm);
if (mm && !IS_ERR(mm)) {
unsigned int nwords = 0;
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ struct vmalloc_info {
unsigned long largest_chunk;
};

extern struct mm_struct *mm_for_maps(struct task_struct *);

#ifdef CONFIG_MMU
#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
extern void get_vmalloc_info(struct vmalloc_info *vmi);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
if (!priv->task)
return ERR_PTR(-ESRCH);

mm = mm_for_maps(priv->task);
mm = mm_access(priv->task, PTRACE_MODE_READ);
if (!mm || IS_ERR(mm))
return mm;
down_read(&mm->mmap_sem);
Expand Down Expand Up @@ -919,7 +919,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
if (!pm.buffer)
goto out_task;

mm = mm_for_maps(task);
mm = mm_access(task, PTRACE_MODE_READ);
ret = PTR_ERR(mm);
if (!mm || IS_ERR(mm))
goto out_free;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/proc/task_nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
if (!priv->task)
return ERR_PTR(-ESRCH);

mm = mm_for_maps(priv->task);
mm = mm_access(priv->task, PTRACE_MODE_READ);
if (!mm || IS_ERR(mm)) {
put_task_struct(priv->task);
priv->task = NULL;
Expand Down

0 comments on commit 131dc50

Please sign in to comment.