]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Replace READ* macros in nfsd4_decode_fattr()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 3 Nov 2020 17:56:05 +0000 (12:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:36 +0000 (14:52 +0200)
commit57516a96cae8c0b5ee53e25d141a4f96cbb1000e
treea874ad58687f9bd63f672a11b1b5d3dd87d93878
parent9737a9a8f923ec7621ea6f9d180e176666b1f435
NFSD: Replace READ* macros in nfsd4_decode_fattr()

[ Upstream commit d1c263a031e876ac3ca5223c728e4d98ed50b3c0 ]

Let's be more careful to avoid overrunning the memory that backs
the bitmap array. This requires updating the synopsis of
nfsd4_decode_fattr().

Bruce points out that a server needs to be careful to return nfs_ok
when a client presents bitmap bits the server doesn't support. This
includes bits in bitmap words the server might not yet support.

The current READ* based implementation is good about that, but that
requirement hasn't been documented.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4xdr.c