userns: don't leak root user
authorAlexey Dobriyan <adobriyan@sw.ru>
Fri, 31 Aug 2007 06:56:34 +0000 (23:56 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 31 Aug 2007 08:42:23 +0000 (01:42 -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 d055d987850cc96ed2a73cc36d064b15d552dcaf..85af9422ea6e0163afd849f59237752825a62406 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);
 }