Skip to content

Commit

Permalink
ptrace: mark __ptrace_may_access() static
Browse files Browse the repository at this point in the history
__ptrace_may_access() is used within only kernel/ptrace.c.

Signed-off-by: Tetsuo Handa <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Tetsuo Handa authored and James Morris committed Aug 3, 2012
1 parent de4bb3b commit 9f99798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions include/linux/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ extern void exit_ptrace(struct task_struct *tracer);
#define PTRACE_MODE_READ 0x01
#define PTRACE_MODE_ATTACH 0x02
#define PTRACE_MODE_NOAUDIT 0x04
/* Returns 0 on success, -errno on denial. */
extern int __ptrace_may_access(struct task_struct *task, unsigned int mode);
/* Returns true on success, false on denial. */
extern bool ptrace_may_access(struct task_struct *task, unsigned int mode);

Expand Down
3 changes: 2 additions & 1 deletion kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ static int ptrace_has_cap(struct user_namespace *ns, unsigned int mode)
return has_ns_capability(current, ns, CAP_SYS_PTRACE);
}

int __ptrace_may_access(struct task_struct *task, unsigned int mode)
/* Returns 0 on success, -errno on denial. */
static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
{
const struct cred *cred = current_cred(), *tcred;

Expand Down

0 comments on commit 9f99798

Please sign in to comment.