net: add a debug check in __skb_push()
Subsystems (2)
PATCH 1/1 net: add a debug check in __skb_push()
Add the following check, to detect bugs sooner for CONFIG_DEBUG_NET=y builds.
DEBUG_NET_WARN_ON_ONCE(skb->data < skb->head);
Signed-off-by Eric Dumazet <[email protected]>
--- include/linux/skbuff.h | 1 + 1 file changed, 1 insertion(+)
include/linux/skbuff.h +1 -0
@@ -2813,6 +2813,7 @@ static inline void *__skb_push(struct sk_buff *skb, unsigned int len)DEBUG_NET_WARN_ON_ONCE (len >INT_MAX ); skb->data -= len; +DEBUG_NET_WARN_ON_ONCE (skb->data < skb->head); skb->len += len;return skb->data; }
Signature · 1 line
2.53.0.rc1.225.gd81095ad13-goog
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 Fri, 30 Jan 2026 16:02:53 +0000 you wrote:
Add the following check, to detect bugs sooner for
CONFIG_DEBUG_NET=ybuilds.DEBUG_NET_WARN_ON_ONCE(skb->data < skb->head);Signed-off-by Eric Dumazet <[email protected]>[...]
Here is the summary with links:
- [net-next] net: add a debug check in __skb_push()
https://git.kernel.org/netdev/net-next/c/dc9fd14bd759
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html