From d2e9ae0ad8c9c2544c31c08f7d763756d135e222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 27 Mar 2008 17:52:40 -0700 Subject: [PATCH] --- yaml --- r: 90419 b: refs/heads/master c: c2aa270ad73d385bd6cdebf5d741bdf18a3e17ad h: refs/heads/master i: 90417: aabfcf8379b1fea2d671589660021a0e59238535 90415: cecec6b6b57ff6b4b847108bb67d288f7340eef5 v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 19 +------------------ trunk/net/core/skbuff.c | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index 0d4567d991cc..d665e8c5ce80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f58518e678e5eef430c8d5cdcc7cd28d285f1980 +refs/heads/master: c2aa270ad73d385bd6cdebf5d741bdf18a3e17ad diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 01a11b0c0291..1baf4d43bb2d 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -902,6 +902,7 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) return tmp; } +extern unsigned char *skb_push(struct sk_buff *skb, unsigned int len); static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) { skb->data -= len; @@ -909,24 +910,6 @@ static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) return skb->data; } -/** - * skb_push - add data to the start of a buffer - * @skb: buffer to use - * @len: amount of data to add - * - * This function extends the used data area of the buffer at the buffer - * start. If this would exceed the total buffer headroom the kernel will - * panic. A pointer to the first byte of the extra data is returned. - */ -static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len) -{ - skb->data -= len; - skb->len += len; - if (unlikely(skb->datahead)) - skb_under_panic(skb, len, current_text_addr()); - return skb->data; -} - extern unsigned char *skb_pull(struct sk_buff *skb, unsigned int len); static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) { diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index 0daf5c0e5b8d..a37127b5899c 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -896,6 +896,25 @@ unsigned char *skb_put(struct sk_buff *skb, unsigned int len) } EXPORT_SYMBOL(skb_put); +/** + * skb_push - add data to the start of a buffer + * @skb: buffer to use + * @len: amount of data to add + * + * This function extends the used data area of the buffer at the buffer + * start. If this would exceed the total buffer headroom the kernel will + * panic. A pointer to the first byte of the extra data is returned. + */ +unsigned char *skb_push(struct sk_buff *skb, unsigned int len) +{ + skb->data -= len; + skb->len += len; + if (unlikely(skb->datahead)) + skb_under_panic(skb, len, __builtin_return_address(0)); + return skb->data; +} +EXPORT_SYMBOL(skb_push); + /** * skb_pull - remove data from the start of a buffer * @skb: buffer to use