diff --git a/net/core/datagram.c b/net/core/datagram.c index 6b7db06eafe6..13f4bf82b2ee 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -447,11 +447,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); }