diff --git a/fs/proc/root.c b/fs/proc/root.c
index de14a7933ee5..8e64572937db 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -180,8 +180,6 @@ static int proc_parse_param(struct fs_context *fc, struct 
fs_parameter *param)
 
        switch (opt) {
        case Opt_gid:
-               if (!kgid_has_mapping(fc->user_ns, result.gid))
-                       return invalfc(fc, "Invalid gid");
                ctx->gid = result.gid;
                break;
 
@@ -241,11 +239,8 @@ static int proc_apply_options(struct proc_fs_info *fs_info,
            ctx->pidonly != fs_info->pidonly)
                return invalf(fc, "proc: subset=pid cannot be changed\n");
 
-       if (ctx->mask & (1 << Opt_gid)) {
-               if (!kgid_has_mapping(fc->user_ns, ctx->gid))
-                       return invalfc(fc, "Invalid gid");
+       if (ctx->mask & (1 << Opt_gid))
                fs_info->pid_gid = ctx->gid;
-       }
        if (ctx->mask & (1 << Opt_hidepid))
                fs_info->hide_pid = ctx->hidepid;
        if (ctx->mask & (1 << Opt_subset))

Reply via email to