]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.
authorDai Ngo <dai.ngo@oracle.com>
Wed, 26 Jan 2022 21:13:38 +0000 (13:13 -0800)
committerChuck Lever <chuck.lever@oracle.com>
Fri, 28 Jan 2022 14:04:00 +0000 (09:04 -0500)
commit2966f503d5aa82c80dd6e7ff5f2056526b052bb6
treeb595b5aa1c6d6eef0da0f907065b5d55a9cdb299
parentb5c51b2d0536b0e9cd02238d1515e8a3a768cb64
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: 8cea5880cebf ("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>
fs/nfsd/nfs4state.c