- Subject: [RFC][v8][PATCH 6/10]: Add target_pids parameter to copy_process()
- From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Oct 2009 21:52:11 -0700
- Cc: Oren Laadan <orenl@xxxxxxxxxxxxxxx>, serue@xxxxxxxxxx, "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>, Alexey Dobriyan <adobriyan@xxxxxxxxx>, Pavel Emelyanov <xemul@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, torvalds@xxxxxxxxxxxxxxxxxxxx, mikew@xxxxxxxxxx, mingo@xxxxxxx, hpa@xxxxxxxxx, Nathan Lynch <nathanl@xxxxxxxxxxxxxx>, arnd@xxxxxxxx, peterz@xxxxxxxxxxxxx, Louis.Rilling@xxxxxxxxxxx, roland@xxxxxxxxxx, kosaki.motohiro@xxxxxxxxxxxxxx, randy.dunlap@xxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, Containers <containers@xxxxxxxxxxxxxxxxxxxxxxxxxx>, sukadev@xxxxxxxxxx
- In-reply-to: <20091013044925.GA28181@xxxxxxxxxx>
- References: <20091013044925.GA28181@xxxxxxxxxx>
- User-agent: Mutt/1.5.18 (2008-05-17)
Subject: [RFC][v8][PATCH 6/10]: Add target_pids parameter to copy_process()
Add a 'target_pids' parameter to copy_process(). The new parameter will be
used in a follow-on patch when clone_with_pids() is implemented.
Signed-off-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
Acked-by: Serge Hallyn <serue@xxxxxxxxxx>
Reviewed-by: Oren Laadan <orenl@xxxxxxxxxxxxxxx>
---
kernel/fork.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: linux-2.6/kernel/fork.c
===================================================================
--- linux-2.6.orig/kernel/fork.c 2009-09-10 10:29:10.000000000 -0700
+++ linux-2.6/kernel/fork.c 2009-09-10 10:29:13.000000000 -0700
@@ -935,12 +935,12 @@ static struct task_struct *copy_process(
unsigned long stack_size,
int __user *child_tidptr,
struct pid *pid,
+ pid_t *target_pids,
int trace)
{
int retval;
struct task_struct *p;
int cgroup_callbacks_done = 0;
- pid_t *target_pids = NULL;
if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS))
return ERR_PTR(-EINVAL);
@@ -1319,7 +1319,7 @@ struct task_struct * __cpuinit fork_idle
struct pt_regs regs;
task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL,
- &init_struct_pid, 0);
+ &init_struct_pid, NULL, 0);
if (!IS_ERR(task))
init_idle(task, cpu);
@@ -1342,6 +1342,7 @@ long do_fork(unsigned long clone_flags,
struct task_struct *p;
int trace = 0;
long nr;
+ pid_t *target_pids = NULL;
/*
* Do some preliminary argument and permissions checking before we
@@ -1382,7 +1383,7 @@ long do_fork(unsigned long clone_flags,
trace = tracehook_prepare_clone(clone_flags);
p = copy_process(clone_flags, stack_start, regs, stack_size,
- child_tidptr, NULL, trace);
+ child_tidptr, NULL, target_pids, trace);
/*
* Do this prior waking up the new thread - the thread pointer
* might get invalid after that point, if the thread exits quickly.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]