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~2958^2~154 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9d19f72b43f495f6f1ef1268dbed1bbade8dea24;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 1155eac61687..7ec6e9939b2c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -800,7 +800,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); }