All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/4] net: netmem: fix skb_ensure_writable with unreadable skbs
@ 2025-06-13  4:28 Mina Almasry
  2025-06-13  4:28 ` [PATCH net-next v1 2/4] netmem: fix netmem comments Mina Almasry
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mina Almasry @ 2025-06-13  4:28 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-kselftest
  Cc: Mina Almasry, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Andrew Lunn, Shuah Khan

skb_ensure_writable actually makes sure that the header of the skb is
writable, and doesn't touch the payload. It doesn't need an
skb_frags_readable check.

Removing this check restores DSCP functionality with unreadable skbs as
it's called from dscp_tg.

Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags")

Signed-off-by: Mina Almasry <almasrymina@google.com>
---
 net/core/skbuff.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 85fc82f72d26..d6420b74ea9c 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -6261,9 +6261,6 @@ int skb_ensure_writable(struct sk_buff *skb, unsigned int write_len)
 	if (!pskb_may_pull(skb, write_len))
 		return -ENOMEM;
 
-	if (!skb_frags_readable(skb))
-		return -EFAULT;
-
 	if (!skb_cloned(skb) || skb_clone_writable(skb, write_len))
 		return 0;
 

base-commit: 6d4e01d29d87356924f1521ca6df7a364e948f13
-- 
2.50.0.rc1.591.g9c95f17f64-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-14 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13  4:28 [PATCH net-next v1 1/4] net: netmem: fix skb_ensure_writable with unreadable skbs Mina Almasry
2025-06-13  4:28 ` [PATCH net-next v1 2/4] netmem: fix netmem comments Mina Almasry
2025-06-14 18:39   ` Jakub Kicinski
2025-06-13  4:28 ` [PATCH net-next v1 3/4] selftests: devmem: remove unused variable Mina Almasry
2025-06-13  4:28 ` [PATCH net-next v1 4/4] selftests: devmem: add ipv4 support to chunks test Mina Almasry
2025-06-14 18:37 ` [PATCH net-next v1 1/4] net: netmem: fix skb_ensure_writable with unreadable skbs Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.