[CRIU] Re: [PATCH] pidns: remove recursion from free_pid_ns (v3)

Cyrill Gorcunov gorcunov at openvz.org
Wed Oct 10 05:21:56 EDT 2012


On Wed, Oct 10, 2012 at 05:12:21PM +0800, Xiaotian Feng wrote:
> >
> > Is a kref even the correct thing here?
> 
> Can we fix this by this way? free_pid_ns just release ns itself, we check
> the return value of kref_put, if kref_put returns 1, means ns->kref is removed,
> then we kref_put(ns->parent).
> 
> diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
> index 00474b0..2168535 100644
> --- a/include/linux/pid_namespace.h
> +++ b/include/linux/pid_namespace.h
> @@ -53,8 +53,14 @@ extern int reboot_pid_ns(struct pid_namespace
> *pid_ns, int cmd);
> 

I've sent the similar patch yesterday, thanks.

http://www.mail-archive.com/stable@vger.kernel.org/msg19471.html


More information about the CRIU mailing list