[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090702172508.GA24086@redhat.com>
Date: Thu, 2 Jul 2009 19:25:08 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Ingo Molnar <mingo@...e.hu>, Ratan Nalumasu <rnalumasu@...il.com>,
Roland McGrath <roland@...hat.com>,
Vitaly Mayatskikh <vmayatsk@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] shift security_task_wait() from eligible_child() to
wait_consider_task()
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@...hat.com>
---
kernel/exit.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- WAIT/kernel/exit.c~1_SPLIT_ELIGIBLE 2009-07-02 18:23:58.000000000 +0200
+++ WAIT/kernel/exit.c 2009-07-02 18:29:24.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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists