Mercurial > illumos > illumos-gate
changeset 4299:c692001191da
6492937 NFSv4 client node panic when kdestroy was executed during lock-largefile tests
author | pf199842 |
---|---|
date | Wed, 23 May 2007 00:29:39 -0700 |
parents | 411ec4c6f829 |
children | d74de773d6e6 |
files | usr/src/uts/common/fs/nfs/nfs4_vnops.c |
diffstat | 1 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/nfs/nfs4_vnops.c Tue May 22 20:22:05 2007 -0700 +++ b/usr/src/uts/common/fs/nfs/nfs4_vnops.c Wed May 23 00:29:39 2007 -0700 @@ -14106,13 +14106,18 @@ NFS4_DEBUG(nfs4_client_lock_debug, (CE_NOTE, "nfs4frlock: needrecov %d", needrecov)); - if (ep->error != 0 && !needrecov && ep->error != EACCES) - goto out; - if (ep->error == 0 && nfs4_need_to_bump_seqid(resp)) nfs4frlock_bump_seqid(lock_args, locku_args, oop, lop, args.ctag); + /* + * Check if one of these mutually exclusive error cases has + * happened: + * need to swap credentials due to access error + * recovery is needed + * different error (only known case is missing Kerberos ticket) + */ + if ((ep->error == EACCES || (ep->error == 0 && resp->status == NFS4ERR_ACCESS)) && cred_otw != cr) { @@ -14160,6 +14165,15 @@ } /* + * Bail out if have reached this point with ep->error set. Can + * happen if (ep->error == EACCES && !needrecov && cred_otw == cr). + * This happens if Kerberos ticket has expired or has been + * destroyed. + */ + if (ep->error != 0) + goto out; + + /* * Process the reply. */ switch (resp->status) {