From: Alexey Dobriyan Date: Fri, 31 Aug 2007 06:56:34 +0000 (-0700) Subject: userns: don't leak root user X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99db67bc04af0f2e8cb710ac92aaeb9af135a7c6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git userns: don't leak root user Signed-off-by: Alexey Dobriyan Acked-by: Cedric Le Goater Acked-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index d055d987850c..85af9422ea6e 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -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); }