mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
SUNRPC: Move upcall out of auth->au_ops->crcreate()
This fixes a bug whereby if two processes try to look up the same auth_gss credential, they may end up creating two creds, and triggering two upcalls because the upcall is performed before the credential is added to the credcache. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
adb12f63e0
commit
fba3bad488
3 changed files with 23 additions and 9 deletions
|
@ -232,6 +232,14 @@ retry:
|
|||
goto retry;
|
||||
} else
|
||||
cred = new;
|
||||
} else if ((cred->cr_flags & RPCAUTH_CRED_NEW)
|
||||
&& cred->cr_ops->cr_init != NULL
|
||||
&& !(flags & RPCAUTH_LOOKUP_NEW)) {
|
||||
int res = cred->cr_ops->cr_init(auth, cred);
|
||||
if (res < 0) {
|
||||
put_rpccred(cred);
|
||||
cred = ERR_PTR(res);
|
||||
}
|
||||
}
|
||||
|
||||
return (struct rpc_cred *) cred;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue