diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-06-14 08:31:46 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-06-14 08:31:46 +0300 |
| commit | 10b90ee2eccca042e2d762881dd7119d201f0898 (patch) | |
| tree | 1ebc06bf55a3e33244228d008a2db0197ae2281e /include/linux/ptrace.h | |
| parent | 84bcc1d57f634ba8a55eda9a910c159467af0aac (diff) | |
| parent | 32c1431eea4881a6b17bd7c639315010aeefa452 (diff) | |
| download | linux-10b90ee2eccca042e2d762881dd7119d201f0898.tar.xz | |
Merge tag 'v4.12-rc5' into ras/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/ptrace.h')
| -rw-r--r-- | include/linux/ptrace.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 422bc2e4cb6a..ef3eb8bbfee4 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -54,7 +54,8 @@ extern int ptrace_request(struct task_struct *child, long request, unsigned long addr, unsigned long data); extern void ptrace_notify(int exit_code); extern void __ptrace_link(struct task_struct *child, - struct task_struct *new_parent); + struct task_struct *new_parent, + const struct cred *ptracer_cred); extern void __ptrace_unlink(struct task_struct *child); extern void exit_ptrace(struct task_struct *tracer, struct list_head *dead); #define PTRACE_MODE_READ 0x01 @@ -206,7 +207,7 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) if (unlikely(ptrace) && current->ptrace) { child->ptrace = current->ptrace; - __ptrace_link(child, current->parent); + __ptrace_link(child, current->parent, current->ptracer_cred); if (child->ptrace & PT_SEIZED) task_set_jobctl_pending(child, JOBCTL_TRAP_STOP); @@ -215,6 +216,8 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) set_tsk_thread_flag(child, TIF_SIGPENDING); } + else + child->ptracer_cred = NULL; } /** |
