Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289713
b: refs/heads/master
c: b6e238d
h: refs/heads/master
i:
  289711: 4bd427f
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Mar 20, 2012
1 parent 7f46450 commit 2abb96a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e636825346b36a07ccfc8e30946d52855e21f681
refs/heads/master: b6e238dceed36891cc633167afe7151f1f3d83c5
14 changes: 0 additions & 14 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,20 +818,6 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL);

/* Let father know we died
*
* Thread signals are configurable, but you aren't going to use
* that to send signals to arbitrary processes.
* That stops right now.
*
* If the parent exec id doesn't match the exec id we saved
* when we started then we know the parent has changed security
* domain.
*/
if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD &&
tsk->parent_exec_id != tsk->real_parent->self_exec_id)
tsk->exit_signal = SIGCHLD;

if (unlikely(tsk->ptrace)) {
int sig = thread_group_leader(tsk) &&
thread_group_empty(tsk) &&
Expand Down
9 changes: 9 additions & 0 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,15 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
BUG_ON(!tsk->ptrace &&
(tsk->group_leader != tsk || !thread_group_empty(tsk)));

if (sig != SIGCHLD) {
/*
* This is only possible if parent == real_parent.
* Check if it has changed security domain.
*/
if (tsk->parent_exec_id != tsk->parent->self_exec_id)
sig = SIGCHLD;
}

info.si_signo = sig;
info.si_errno = 0;
/*
Expand Down

0 comments on commit 2abb96a

Please sign in to comment.