Skip to content

Commit ab451ea

Browse files
daimngochucklever
authored andcommitted
nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.
From RFC 7530 Section 16.34.5: o The server has not recorded an unconfirmed { v, x, c, *, * } and has recorded a confirmed { v, x, c, *, s }. If the principals of the record and of SETCLIENTID_CONFIRM do not match, the server returns NFS4ERR_CLID_INUSE without removing any relevant leased client state, and without changing recorded callback and callback_ident values for client { x }. The current code intends to do what the spec describes above but it forgot to set 'old' to NULL resulting to the confirmed client to be expired. Fixes: 2b63482 ("nfsd: fix clid_inuse on mount with security change") Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Bruce Fields <bfields@fieldses.org>
1 parent d19a7af commit ab451ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/nfsd/nfs4state.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4130,8 +4130,10 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
41304130
status = nfserr_clid_inuse;
41314131
if (client_has_state(old)
41324132
&& !same_creds(&unconf->cl_cred,
4133-
&old->cl_cred))
4133+
&old->cl_cred)) {
4134+
old = NULL;
41344135
goto out;
4136+
}
41354137
status = mark_client_expired_locked(old);
41364138
if (status) {
41374139
old = NULL;

0 commit comments

Comments
 (0)