we should release the reference of old userns. Signed-off-by: Gao feng <gaofeng@xxxxxxxxxxxxxx> --- kernel/user_namespace.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 054471d..dafa125 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -812,6 +812,7 @@ static int userns_install(struct nsproxy *nsproxy, void *ns) if (!cred) return -ENOMEM; + put_user_ns(cred->user_ns); set_cred_user_ns(cred, get_user_ns(user_ns)); return commit_creds(cred); -- 1.7.7.6 _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/containers