[CRIU] Re: [PATCH] pidns: remove recursion from free_pid_ns

Cyrill Gorcunov gorcunov at openvz.org
Fri Oct 5 02:36:02 EDT 2012


On Fri, Oct 05, 2012 at 01:21:02AM +0400, Andrew Vagin wrote:
> Here is a stack trace of recursion:
> free_pid_ns(parent)
>   put_pid_ns(parent)
>     kref_put(&ns->kref, free_pid_ns);
>       free_pid_ns
> 
> This patch turns recursion into loops.
> 
> pidns can be nested many times, so in case of recursion
> a simple user space program can provoke a kernel panic
> due to exceed of a kernel stack.

Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>

Looks good to me. Thanks Andrew!


More information about the CRIU mailing list