Patch "NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS" has been added to the 6.0-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

    NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS

to the 6.0-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:
     nfsv4.2-set-the-correct-size-scratch-buffer-for-deco.patch
and it can be found in the queue-6.0 subdirectory.

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



commit f741a2e39cf5ddd6f333cede4703dee930aeda73
Author: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>
Date:   Wed Nov 30 13:15:25 2022 -0500

    NFSv4.2: Set the correct size scratch buffer for decoding READ_PLUS
    
    [ Upstream commit 36357fe74ef736524a29fbd3952948768510a8b9 ]
    
    The scratch_buf array is 16 bytes, but I was passing 32 to the
    xdr_set_scratch_buffer() function. Fix this by using sizeof(), which is
    what I probably should have been doing this whole time.
    
    Fixes: d3b00a802c84 ("NFS: Replace the READ_PLUS decoding code")
    Signed-off-by: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
index b56f05113d36..f742c7a5745e 100644
--- a/fs/nfs/nfs42xdr.c
+++ b/fs/nfs/nfs42xdr.c
@@ -1134,7 +1134,7 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res)
 	if (!segs)
 		return -ENOMEM;
 
-	xdr_set_scratch_buffer(xdr, &scratch_buf, 32);
+	xdr_set_scratch_buffer(xdr, &scratch_buf, sizeof(scratch_buf));
 	status = -EIO;
 	for (i = 0; i < segments; i++) {
 		status = decode_read_plus_segment(xdr, &segs[i]);



[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