mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ptrace: introduce ptrace_reparented() helper
Add another trivial helper for the sake of grep. It also auto-documents the fact that ->parent != real_parent implies ->ptrace. No functional changes. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2800d8d19e
commit
53b6f9fbd3
2 changed files with 8 additions and 5 deletions
|
@ -98,6 +98,10 @@ extern void ptrace_untrace(struct task_struct *child);
|
|||
extern int ptrace_may_attach(struct task_struct *task);
|
||||
extern int __ptrace_may_attach(struct task_struct *task);
|
||||
|
||||
static inline int ptrace_reparented(struct task_struct *child)
|
||||
{
|
||||
return child->real_parent != child->parent;
|
||||
}
|
||||
static inline void ptrace_link(struct task_struct *child,
|
||||
struct task_struct *new_parent)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue