--- zzzz-none-000/linux-3.10.107/fs/nfsd/auth.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/fs/nfsd/auth.c 2021-02-04 17:41:59.000000000 +0000 @@ -1,7 +1,6 @@ /* Copyright (C) 1995, 1996 Olaf Kirch */ #include -#include #include "nfsd.h" #include "auth.h" @@ -25,12 +24,11 @@ struct cred *new; int i; int flags = nfsexp_flags(rqstp, exp); - int ret; validate_process_creds(); /* discard any old override before preparing the new set */ - revert_creds(get_cred(current->real_cred)); + revert_creds(get_cred(current_real_cred())); new = prepare_creds(); if (!new) return -ENOMEM; @@ -71,10 +69,8 @@ if (gid_eq(new->fsgid, INVALID_GID)) new->fsgid = exp->ex_anon_gid; - ret = set_groups(new, gi); + set_groups(new, gi); put_group_info(gi); - if (ret < 0) - goto error; if (!uid_eq(new->fsuid, GLOBAL_ROOT_UID)) new->cap_effective = cap_drop_nfsd_set(new->cap_effective); @@ -88,9 +84,7 @@ return 0; oom: - ret = -ENOMEM; -error: abort_creds(new); - return ret; + return -ENOMEM; }