Revert "ASoC: rt5651: Enable jack detection on JD* pins"
[sfrench/cifs-2.6.git] / kernel / sys.c
index 2855ee73acd0ef9f62699ff669659e045df84422..9aebc293501330ffdfef0b6ad53df155ae6b31ca 100644 (file)
@@ -1896,15 +1896,11 @@ static int validate_prctl_map(struct prctl_mm_map *prctl_map)
 
        /*
         * Finally, make sure the caller has the rights to
-        * change /proc/pid/exe link: only local root should
+        * change /proc/pid/exe link: only local sys admin should
         * be allowed to.
         */
        if (prctl_map->exe_fd != (u32)-1) {
-               struct user_namespace *ns = current_user_ns();
-               const struct cred *cred = current_cred();
-
-               if (!uid_eq(cred->uid, make_kuid(ns, 0)) ||
-                   !gid_eq(cred->gid, make_kgid(ns, 0)))
+               if (!ns_capable(current_user_ns(), CAP_SYS_ADMIN))
                        goto out;
        }