From: San Mehat Date: Wed, 16 Sep 2009 19:39:10 +0000 (-0700) Subject: proc: smaps: Allow smaps access for CAP_SYS_RESOURCE X-Git-Tag: firefly_0821_release~4090^2~831 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d590b5b6953304edb000de90335a3b4838b2482c;p=firefly-linux-kernel-4.4.55.git proc: smaps: Allow smaps access for CAP_SYS_RESOURCE Signed-off-by: San Mehat --- diff --git a/kernel/fork.c b/kernel/fork.c index 987b28a1f01b..5733ad5d5856 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -696,7 +696,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); }