Patch "nvmet-tcp: pass iov_len instead of sg->length to bvec_set_page()" has been added to the 6.5-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

    nvmet-tcp: pass iov_len instead of sg->length to bvec_set_page()

to the 6.5-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:
     nvmet-tcp-pass-iov_len-instead-of-sg-length-to-bvec_.patch
and it can be found in the queue-6.5 subdirectory.

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



commit f04f081f064034112bd7c8b7618ec1c5eedd97f8
Author: Varun Prakash <varun@xxxxxxxxxxx>
Date:   Wed Aug 9 15:56:45 2023 +0530

    nvmet-tcp: pass iov_len instead of sg->length to bvec_set_page()
    
    [ Upstream commit 1f0bbf28940cf5edad90ab57b62aa8197bf5e836 ]
    
    iov_len is the valid data length, so pass iov_len instead of sg->length to
    bvec_set_page().
    
    Fixes: 5bfaba275ae6 ("nvmet-tcp: don't map pages which can't come from HIGHMEM")
    Signed-off-by: Rakshana Sridhar <rakshanas@xxxxxxxxxxx>
    Signed-off-by: Varun Prakash <varun@xxxxxxxxxxx>
    Reviewed-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 868aa4de2e4c4..cd92d7ddf5ed1 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -348,7 +348,7 @@ static void nvmet_tcp_build_pdu_iovec(struct nvmet_tcp_cmd *cmd)
 	while (length) {
 		u32 iov_len = min_t(u32, length, sg->length - sg_offset);
 
-		bvec_set_page(iov, sg_page(sg), sg->length,
+		bvec_set_page(iov, sg_page(sg), iov_len,
 				sg->offset + sg_offset);
 
 		length -= iov_len;



[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