mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] coredump: kill ptrace related stuff
With this patch zap_process() sets SIGNAL_GROUP_EXIT while sending SIGKILL to the thread group. This means that a TASK_TRACED task 1. Will be awakened by signal_wake_up(1) 2. Can't sleep again via ptrace_notify() 3. Can't go to do_signal_stop() after return from ptrace_stop() in get_signal_to_deliver() So we can remove all ptrace related stuff from coredump path. Signed-off-by: Oleg Nesterov <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Roland McGrath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
281de339ce
commit
d5f70c00ad
4 changed files with 37 additions and 32 deletions
|
|
@ -214,7 +214,7 @@ out:
|
|||
return retval;
|
||||
}
|
||||
|
||||
void __ptrace_detach(struct task_struct *child, unsigned int data)
|
||||
static inline void __ptrace_detach(struct task_struct *child, unsigned int data)
|
||||
{
|
||||
child->exit_code = data;
|
||||
/* .. re-parent .. */
|
||||
|
|
@ -233,6 +233,7 @@ int ptrace_detach(struct task_struct *child, unsigned int data)
|
|||
ptrace_disable(child);
|
||||
|
||||
write_lock_irq(&tasklist_lock);
|
||||
/* protect against de_thread()->release_task() */
|
||||
if (child->ptrace)
|
||||
__ptrace_detach(child, data);
|
||||
write_unlock_irq(&tasklist_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue