Patch "nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0)" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0)
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nfsd-close-should-return-the-invalid-special-stateid-for-nfsv4.x-x-0.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Feb 1 14:00:34 CET 2018
From: Trond Myklebust <[email protected]>
Date: Fri, 3 Nov 2017 08:00:12 -0400
Subject: nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0)
From: Trond Myklebust <[email protected]>
[ Upstream commit fb500a7cfee7f2f447d2bbf30cb59629feab6ac1 ]
--- fs/nfsd/nfs4state.c | 8 ++++++++ 1 file changed, 8 insertions(+)
fs/nfsd/nfs4state.c +8 -0
@@ -63,6 +63,9 @@ static const stateid_t zero_stateid = {static const stateid_t currentstateid = { .si_generation =1 , }; +static const stateid_t close_stateid = { + .si_generation =0xffffffffU , +};static u64 current_sessionid =1 ;
@@ -5407,6 +5410,11 @@ nfsd4_close(struct svc_rqst *rqstp, strunfsd4_close_open_stateid (stp);mutex_unlock (&stp->st_mutex); +/* See RFC5661 sectionm 18.2.4 */ +if (stp->st_stid.sc_client->cl_minorversion) +memcpy (&close->cl_stateid, &close_stateid, +sizeof (close->cl_stateid)); +/* put reference from nfs4_preprocess_seqid_op */ nfs4_put_stid (&stp->st_stid); out:
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/nfsd-ensure-we-check-stateid-validity-in-the-seqid-operation-checks.patch queue-4.9/sunrpc-allow-connect-to-return-ehostunreach.patch queue-4.9/nfsd-close-should-return-the-invalid-special-stateid-for-nfsv4.x-x-0.patch