Skip to contentSkip to conversation

Revert "net: micro-optimize skb_datagram_iter"

PATCH Applied Sagi Grimberg 2 participants 2 messages Jun 26, 2024 – Jun 27, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Revert "net: micro-optimize skb_datagram_iter"

This reverts commit 934c29999b57b835d65442da6f741d5e27f3b584. This triggered a usercopy BUG() in systems with HIGHMEM, reported by the test robot in:
https://lore.kernel.org/oe-lkp/[email protected]

---
Changes from v1:
- added target tree

 net/core/datagram.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/datagram.c +2 -2
index 95f242591fd2..e614cfd8e14a 100644
@@ -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;
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 26 Jun 2024 10:01:53 +0300 you wrote:

This reverts commit 934c29999b57b835d65442da6f741d5e27f3b584. This triggered a usercopy BUG() in systems with HIGHMEM, reported by the test robot in:
https://lore.kernel.org/oe-lkp/[email protected]

[...]

Here is the summary with links:
- [net-next,v2] Revert "net: micro-optimize skb_datagram_iter"

    https://git.kernel.org/netdev/net-next/c/2d5f6801db8e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html