net: fix rc7's __skb_datagram_iter()
authorHugh Dickins <hughd@google.com>
Mon, 8 Jul 2024 14:46:00 +0000 (07:46 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Jul 2024 18:24:54 +0000 (11:24 -0700)
commitf153831097b4435f963e385304cc0f1acba1c657
treee6773e39cd23c711f7ff1264f36d1d9fb0e47f64
parent528269fe117f3b19461733a0fa408c55a5270aff
net: fix rc7's __skb_datagram_iter()

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@google.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Link: https://patch.msgid.link/fef352e8-b89a-da51-f8ce-04bc39ee6481@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/datagram.c