Patch "svcrdma: fix bounce buffers for unaligned offsets and multiple pages" has been added to the 5.9-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

    svcrdma: fix bounce buffers for unaligned offsets and multiple pages

to the 5.9-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:
     svcrdma-fix-bounce-buffers-for-unaligned-offsets-and.patch
and it can be found in the queue-5.9 subdirectory.

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



commit 9448a7c89d45cd791c233704fad4790050f4ba93
Author: Dan Aloni <dan@xxxxxxxxxxxx>
Date:   Fri Oct 2 22:33:43 2020 +0300

    svcrdma: fix bounce buffers for unaligned offsets and multiple pages
    
    [ Upstream commit c327a310ec4d6ecbea13185ed56c11def441d9ab ]
    
    This was discovered using O_DIRECT at the client side, with small
    unaligned file offsets or IOs that span multiple file pages.
    
    Fixes: e248aa7be86 ("svcrdma: Remove max_sge check at connect time")
    Signed-off-by: Dan Aloni <dan@xxxxxxxxxxxx>
    Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 7b94d971feb3b..c3d588b149aaa 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -638,10 +638,11 @@ static int svc_rdma_pull_up_reply_msg(struct svcxprt_rdma *rdma,
 		while (remaining) {
 			len = min_t(u32, PAGE_SIZE - pageoff, remaining);
 
-			memcpy(dst, page_address(*ppages), len);
+			memcpy(dst, page_address(*ppages) + pageoff, len);
 			remaining -= len;
 			dst += len;
 			pageoff = 0;
+			ppages++;
 		}
 	}
 



[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