Patch "net: fix rc7's __skb_datagram_iter()" has been added to the 6.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

    net: fix rc7's __skb_datagram_iter()

to the 6.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:
     net-fix-rc7-s-__skb_datagram_iter.patch
and it can be found in the queue-6.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 733f62e2b14867199a08dbda10e9c1efa3e56a47
Author: Hugh Dickins <hughd@xxxxxxxxxx>
Date:   Mon Jul 8 07:46:00 2024 -0700

    net: fix rc7's __skb_datagram_iter()
    
    [ Upstream commit f153831097b4435f963e385304cc0f1acba1c657 ]
    
    X would not start in my old 32-bit partition (and the "n"-handling looks
    just as wrong on 64-bit, but for whatever reason did not show up there):
    "n" must be accumulated over all pages before it's added to "offset" and
    compared with "copy", immediately after the skb_frag_foreach_page() loop.
    
    Fixes: d2d30a376d9c ("net: allow skb_datagram_iter to be called from any context")
    Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
    Reviewed-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
    Link: https://patch.msgid.link/fef352e8-b89a-da51-f8ce-04bc39ee6481@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/datagram.c b/net/core/datagram.c
index cb72923acc21c..99abfafb0b439 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -442,11 +442,12 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
 			if (copy > len)
 				copy = len;
 
+			n = 0;
 			skb_frag_foreach_page(frag,
 					      skb_frag_off(frag) + offset - start,
 					      copy, p, p_off, p_len, copied) {
 				vaddr = kmap_local_page(p);
-				n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
+				n += INDIRECT_CALL_1(cb, simple_copy_to_iter,
 					vaddr + p_off, p_len, data, to);
 				kunmap_local(vaddr);
 			}




[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