]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSv4.2: fix COPY_NOTIFY xdr buf size calculation
authorOlga Kornievskaia <okorniev@redhat.com>
Fri, 13 Dec 2024 16:52:00 +0000 (11:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:06 +0000 (10:02 +0100)
[ Upstream commit e8380c2d06055665b3df6c03964911375d7f9290 ]

We need to include sequence size in the compound.

Fixes: 0491567b51ef ("NFS: add COPY_NOTIFY operation")
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs42xdr.c

index 9e3ae53e220583c2cb1a94ced51c45db51cf91cd..becc3149aa9e5c404346e71d18e1c1e5a6408487 100644 (file)
                                         decode_putfh_maxsz + \
                                         decode_offload_cancel_maxsz)
 #define NFS4_enc_copy_notify_sz                (compound_encode_hdr_maxsz + \
+                                        encode_sequence_maxsz + \
                                         encode_putfh_maxsz + \
                                         encode_copy_notify_maxsz)
 #define NFS4_dec_copy_notify_sz                (compound_decode_hdr_maxsz + \
+                                        decode_sequence_maxsz + \
                                         decode_putfh_maxsz + \
                                         decode_copy_notify_maxsz)
 #define NFS4_enc_deallocate_sz         (compound_encode_hdr_maxsz + \