[Devel] Re: [RFC][v3][PATCH 4/7] Add target_pids parameter to alloc_pid()

Amerigo Wang xiyou.wangcong at gmail.com
Mon Jun 1 01:34:19 PDT 2009


On Sat, May 30, 2009 at 05:02:20PM -0700, Sukadev Bhattiprolu wrote:
>
>From: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
>Date: Mon, 4 May 2009 01:17:42 -0700
>Subject: [RFC][v3][PATCH 4/7] Add target_pids parameter to alloc_pid()
>
>This parameter is currently NULL, but will be used in a follow-on patch.

<snip>

>diff --git a/kernel/pid.c b/kernel/pid.c
>index b44dd21..090b221 100644
>--- a/kernel/pid.c
>+++ b/kernel/pid.c
>@@ -280,13 +280,14 @@ void free_pid(struct pid *pid)
> 	call_rcu(&pid->rcu, delayed_put_pid);
> }
> 
>-struct pid *alloc_pid(struct pid_namespace *ns)
>+struct pid *alloc_pid(struct pid_namespace *ns, pid_t *target_pids)
> {
> 	struct pid *pid;
> 	enum pid_type type;
> 	int i, nr;
> 	struct pid_namespace *tmp;
> 	struct upid *upid;
>+	int tpid;
> 
> 	pid = kmem_cache_alloc(ns->pid_cachep, GFP_KERNEL);
> 	if (!pid)
>@@ -294,7 +295,11 @@ struct pid *alloc_pid(struct pid_namespace *ns)
> 
> 	tmp = ns;
> 	for (i = ns->level; i >= 0; i--) {
>-		nr = alloc_pidmap(tmp, 0);
>+		tpid = 0;

How about initializing 'tpid' to 0 when define it?

Otherwise,

Reviewed-by: WANG Cong <xiyou.wangcong at gmail.com>
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list