Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752746AbZIGVL2 (ORCPT ); Mon, 7 Sep 2009 17:11:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752375AbZIGVL2 (ORCPT ); Mon, 7 Sep 2009 17:11:28 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:51821 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbZIGVL1 (ORCPT ); Mon, 7 Sep 2009 17:11:27 -0400 Date: Mon, 7 Sep 2009 14:15:54 -0700 From: Sukadev Bhattiprolu To: linux-kernel@vger.kernel.org Cc: serue@us.ibm.com, Oren Laadan , "Eric W. Biederman" , Alexey Dobriyan , Pavel Emelyanov , Andrew Morton , torvalds@linux-foundation.org, mikew@google.com, mingo@elte.hu, hpa@zytor.com, Containers , sukadev@us.ibm.com Subject: [RFC][v5][PATCH 6/8]: Add target_pids parameter to copy_process() Message-ID: <20090907211553.GF6685@us.ibm.com> References: <20090907211302.GA5892@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090907211302.GA5892@us.ibm.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2059 Lines: 63 Subject: [RFC][v5][PATCH 6/8]: 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 Acked-by: Serge Hallyn Reviewed-by: Oren Laadan --- kernel/fork.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: linux-mmotm/kernel/fork.c =================================================================== --- linux-mmotm.orig/kernel/fork.c 2009-09-05 21:19:16.000000000 -0700 +++ linux-mmotm/kernel/fork.c 2009-09-05 21:19:58.000000000 -0700 @@ -978,12 +978,12 @@ 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); @@ -1365,7 +1365,7 @@ 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); @@ -1388,6 +1388,7 @@ struct task_struct *p; int trace = 0; long nr; + pid_t *target_pids = NULL; /* * Do some preliminary argument and permissions checking before we @@ -1428,7 +1429,7 @@ 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/