]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: use correct loop termination in nfsd4_revoke_states()
authorNeilBrown <neil@brown.name>
Sun, 14 Dec 2025 21:07:28 +0000 (08:07 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:10 +0000 (16:35 +0100)
commit099a880ef541ea599c16e7957b51675b7676b062
tree58cbf6c18379f01ac09107ab1a173bc4e0036d39
parent53f07d095e7e680c5e4569a55a019f2c0348cdc6
nfsd: use correct loop termination in nfsd4_revoke_states()

commit fb321998de7639f1954430674475e469fb529d9c upstream.

The loop in nfsd4_revoke_states() stops one too early because
the end value given is CLIENT_HASH_MASK where it should be
CLIENT_HASH_SIZE.

This means that an admin request to drop all locks for a filesystem will
miss locks held by clients which hash to the maximum possible hash value.

Fixes: 1ac3629bf012 ("nfsd: prepare for supporting admin-revocation of state")
Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neil@brown.name>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c