Merge tag 'arm-soc-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[platform/kernel/linux-rpi.git] / kernel / utsname.c
index f0e4911..e488d0e 100644 (file)
@@ -140,12 +140,13 @@ static void utsns_put(struct ns_common *ns)
        put_uts_ns(to_uts_ns(ns));
 }
 
-static int utsns_install(struct nsproxy *nsproxy, struct ns_common *new)
+static int utsns_install(struct nsset *nsset, struct ns_common *new)
 {
+       struct nsproxy *nsproxy = nsset->nsproxy;
        struct uts_namespace *ns = to_uts_ns(new);
 
        if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) ||
-           !ns_capable(current_user_ns(), CAP_SYS_ADMIN))
+           !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN))
                return -EPERM;
 
        get_uts_ns(ns);