diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-04-29 12:01:23 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-04-30 18:49:29 -0400 |
commit | 78a3d9d5654a7fd99cf8b2ab06b9497b9c7aad64 (patch) | |
tree | 763ab08a72b381327b2868702818d527f91bce50 /kernel/exit.c | |
parent | ecd6de3c88e8cbcad175b2eab48ba05c2014f7b6 (diff) |
do_wait: do take security_task_wait() into account
I was never able to understand what should we actually do when
security_task_wait() fails, but the current code doesn't look right.
If ->task_wait() returns the error, we update *notask_error correctly.
But then we either reap the child (despite the fact this was forbidden)
or clear *notask_error (and hide the securiy policy problems).
This patch assumes that "stolen by ptrace" doesn't matter. If selinux
denies the child we should ignore it but make sure we report -EACCESS
instead of -ECHLD if there are no other eligible children.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 167e1e3ad7c6..d2e8239ea187 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1582,6 +1582,7 @@ static int wait_consider_task(struct task_struct *parent, int ptrace, | |||
1582 | */ | 1582 | */ |
1583 | if (*notask_error) | 1583 | if (*notask_error) |
1584 | *notask_error = ret; | 1584 | *notask_error = ret; |
1585 | return 0; | ||
1585 | } | 1586 | } |
1586 | 1587 | ||
1587 | if (likely(!ptrace) && unlikely(p->ptrace)) { | 1588 | if (likely(!ptrace) && unlikely(p->ptrace)) { |