aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@marvell.com>2008-11-11 00:45:05 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-11 00:45:05 -0500
commit5cd33db2120b5ce972568711156f91da83bff2d7 (patch)
tree764e7b41ee2ffdf0e42a7dd005ece814ce88680d /net
parentb971e7ac834e9f4bda96d5a96ae9abccd01c1dd8 (diff)
net: fix setting of skb->tail in skb_recycle_check()
Since skb_reset_tail_pointer() reads skb->data, we need to set skb->data before calling skb_reset_tail_pointer(). This was causing spurious skb_over_panic()s from skb_put() being called on a recycled skb that had its skb->tail set to beyond where it should have been. Bug report from Peter van Valderen <linux@ddcrew.com>. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/skbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index ebb6b94f8af2..d49ef8301b5b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -486,8 +486,8 @@ int skb_recycle_check(struct sk_buff *skb, int skb_size)
486 shinfo->frag_list = NULL; 486 shinfo->frag_list = NULL;
487 487
488 memset(skb, 0, offsetof(struct sk_buff, tail)); 488 memset(skb, 0, offsetof(struct sk_buff, tail));
489 skb_reset_tail_pointer(skb);
490 skb->data = skb->head + NET_SKB_PAD; 489 skb->data = skb->head + NET_SKB_PAD;
490 skb_reset_tail_pointer(skb);
491 491
492 return 1; 492 return 1;
493} 493}