[PATCH] [userns/for-testing] set ucounts for mount namespaces

Eric W. Biederman ebiederm at xmission.com
Wed Aug 31 12:43:40 UTC 2016


Andrei Vagin <avagin at openvz.org> writes:

> It is used in free_mnt_ns():
>         dec_mnt_namespaces(ns->ucounts);

Doh!

Thank you for catching this.

Eric


> Signed-off-by: Andrei Vagin <avagin at openvz.org>
> ---
>  fs/namespace.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 0873371..491b8f3 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -2775,6 +2775,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
>  	init_waitqueue_head(&new_ns->poll);
>  	new_ns->event = 0;
>  	new_ns->user_ns = get_user_ns(user_ns);
> +	new_ns->ucounts = ucounts;
>  	return new_ns;
>  }


More information about the Containers mailing list