summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-09-16 12:39:10 -0700
committerColin Cross <ccross@android.com>2012-02-14 11:30:16 -0800
commit98ec37b666b3b0a005e33858ee151ba98d3aaa8c (patch)
tree33850e016cdd08252f44d60014f01c350cf529e2 /kernel
parentf521244ad0f238eb348b349e51f222ceff8473ec (diff)
proc: smaps: Allow smaps access for CAP_SYS_RESOURCE
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 1b2ef3c23ae..1fde44e3dbb 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -658,7 +658,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
mm = get_task_mm(task);
if (mm && mm != current->mm &&
- !ptrace_may_access(task, mode)) {
+ !ptrace_may_access(task, mode) &&
+ !capable(CAP_SYS_RESOURCE)) {
mmput(mm);
mm = ERR_PTR(-EACCES);
}