From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Ratan Nalumasu <rnalumasu@gmail.com>,
Roland McGrath <roland@redhat.com>,
Vitaly Mayatskikh <vmayatsk@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [RFC,PATCH 1/2] shift security_task_wait() from eligible_child() to wait_consider_task()
Date: Mon, 22 Jun 2009 19:04:34 +0200 [thread overview]
Message-ID: <20090622170434.GA4903@redhat.com> (raw)
Preparation, no functional changes.
eligible_child() has a single caller, wait_consider_task(). We can move
security_task_wait() out from eligible_child(), this allows us to use it
for filtered wake_up().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
kernel/exit.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- WAIT/kernel/exit.c~1_SPLIT_ELIGIBLE 2009-06-22 17:19:55.000000000 +0200
+++ WAIT/kernel/exit.c 2009-06-22 17:33:08.000000000 +0200
@@ -1104,8 +1104,6 @@ static struct pid *task_pid_type(struct
static int eligible_child(struct wait_opts *wo, struct task_struct *p)
{
- int err;
-
if (wo->wo_type < PIDTYPE_MAX) {
if (task_pid_type(p, wo->wo_type) != wo->wo_pid)
return 0;
@@ -1120,10 +1118,6 @@ static int eligible_child(struct wait_op
&& !(wo->wo_flags & __WALL))
return 0;
- err = security_task_wait(p);
- if (err)
- return err;
-
return 1;
}
@@ -1480,6 +1474,7 @@ static int wait_consider_task(struct wai
if (!ret)
return ret;
+ ret = security_task_wait(p);
if (unlikely(ret < 0)) {
/*
* If we have not yet seen any eligible child,
reply other threads:[~2009-06-22 20:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090622170434.GA4903@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rnalumasu@gmail.com \
--cc=roland@redhat.com \
--cc=vmayatsk@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.