Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <edumazet@google.com>
Link: https://patch.msgid.link/20260130160253.2936789-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
dc9fd14b 87ef8c26

+1
+1
include/linux/skbuff.h
··· 2813 2813 DEBUG_NET_WARN_ON_ONCE(len > INT_MAX); 2814 2814 2815 2815 skb->data -= len; 2816 + DEBUG_NET_WARN_ON_ONCE(skb->data < skb->head); 2816 2817 skb->len += len; 2817 2818 return skb->data; 2818 2819 }