]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: Change the way the expected length of a fattr4 is checked
authorChuck Lever <chuck.lever@oracle.com>
Thu, 19 Nov 2020 18:09:13 +0000 (13:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:35 +0000 (14:52 +0200)
commit2a8ae039571cec9c3e554615daaa02f06a68429f
treef94485573a6c26c3432ab78a0a65cd34eee8c90e
parentf82c6ad7e2fb55743ef28bfa6466387146b5adb9
NFSD: Change the way the expected length of a fattr4 is checked

[ Upstream commit 081d53fe0b43c47c36d1832b759bf14edde9cdbb ]

Because the fattr4 is now managed in an xdr_stream, all that is
needed is to store the initial position of the stream before
decoding the attribute list. Then the actual length of the list
is computed using the final stream position, after decoding is
complete.

No behavior change is expected.

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