]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 10 Feb 2022 14:31:35 +0000 (15:31 +0100)
commit617ec83581cafe385e2ac59f68e6db14115cfcd8
tree5f09e72c61f30182d8f4fa9c61d849841fb49fa4
parentad36bfec82a69489c0a4c8b67d78235f714f2640
nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.

BugLink: https://bugs.launchpad.net/bugs/1960516
commit ab451ea952fe9d7afefae55ddb28943a148247fe upstream.

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: 2b63482185e6 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/nfsd/nfs4state.c