projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87ef8c2
)
net: add a debug check in __skb_push()
author
Eric Dumazet
<edumazet@google.com>
Fri, 30 Jan 2026 16:02:53 +0000
(16:02 +0000)
committer
Jakub Kicinski
<kuba@kernel.org>
Tue, 3 Feb 2026 01:24:14 +0000
(17:24 -0800)
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>
include/linux/skbuff.h
patch
|
blob
|
history
diff --git
a/include/linux/skbuff.h
b/include/linux/skbuff.h
index
e6bfe5d
..
8b399dd
100644
(file)
--- a/
include/linux/skbuff.h
+++ b/
include/linux/skbuff.h
@@
-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;
}