Patch "nfsd: Remove incorrect check in nfsd4_validate_stateid" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nfsd: Remove incorrect check in nfsd4_validate_stateid

to the 4.19-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-remove-incorrect-check-in-nfsd4_validate_statei.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4f26a1c4edd1c5752c89413fb4a5f437874ab4b0
Author: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Date:   Tue Jul 18 08:38:37 2023 -0400

    nfsd: Remove incorrect check in nfsd4_validate_stateid
    
    [ Upstream commit f75546f58a70da5cfdcec5a45ffc377885ccbee8 ]
    
    If the client is calling TEST_STATEID, then it is because some event
    occurred that requires it to check all the stateids for validity and
    call FREE_STATEID on the ones that have been revoked. In this case,
    either the stateid exists in the list of stateids associated with that
    nfs4_client, in which case it should be tested, or it does not. There
    are no additional conditions to be considered.
    
    Reported-by: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
    Fixes: 7df302f75ee2 ("NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID")
    Cc: stable@xxxxxxxxxxxxxxx # v5.7+
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
    Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 653ba2ffd4339..35aa2db611b65 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4998,8 +4998,6 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
 	if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
 		CLOSE_STATEID(stateid))
 		return status;
-	if (!same_clid(&stateid->si_opaque.so_clid, &cl->cl_clientid))
-		return status;
 	spin_lock(&cl->cl_lock);
 	s = find_stateid_locked(cl, stateid);
 	if (!s)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux