[Devel] [patch 06/20] [Network namespace] Move the nsproxy NULL affection

Dmitry Mishin dim at openvz.org
Mon Dec 11 07:22:58 PST 2006


On Monday 11 December 2006 00:58, dlezcano at fr.ibm.com wrote:
> Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
> 
> ---
> 
>  kernel/nsproxy.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> Index: 2.6.19-rc6-mm2/kernel/nsproxy.c
> ===================================================================
> --- 2.6.19-rc6-mm2.orig/kernel/nsproxy.c
> +++ 2.6.19-rc6-mm2/kernel/nsproxy.c
> @@ -54,10 +54,10 @@ void exit_task_namespaces(struct task_st
>  {
>  	struct nsproxy *ns = p->nsproxy;
>  	if (ns) {
> +		put_nsproxy(ns);
>  		task_lock(p);
>  		p->nsproxy = NULL;
>  		task_unlock(p);
> -		put_nsproxy(ns);
>  	}
>  }
This will follow in a race.


-- 
Thanks,
Dmitry.




More information about the Devel mailing list