userns: don't leak root user
Alexey Dobriyan [Fri, 31 Aug 2007 06:56:34 +0000 (23:56 -0700)]
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Cedric Le Goater <clg@fr.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

kernel/user_namespace.c

index d055d98..85af942 100644 (file)
@@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
        struct user_namespace *ns;
 
        ns = container_of(kref, struct user_namespace, kref);
+       free_uid(ns->root_user);
        kfree(ns);
 }