Commit 2d5f6801 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Jakub Kicinski

Revert "net: micro-optimize skb_datagram_iter"

This reverts commit 934c2999.
This triggered a usercopy BUG() in systems with HIGHMEM, reported
by the test robot in:
 https://lore.kernel.org/oe-lkp/202406161539.b5ff7b20-oliver.sang@intel.comSigned-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Link: https://patch.msgid.link/20240626070153.759257-1-sagi@grimberg.meSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3a158e2e
......@@ -417,14 +417,14 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
end = start + skb_frag_size(frag);
if ((copy = end - offset) > 0) {
struct page *page = skb_frag_page(frag);
u8 *vaddr = kmap_local_page(page);
u8 *vaddr = kmap(page);
if (copy > len)
copy = len;
n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
vaddr + skb_frag_off(frag) + offset - start,
copy, data, to);
kunmap_local(vaddr);
kunmap(page);
offset += n;
if (n != copy)
goto short_copy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment