]> Pileus Git - ~andy/linux/blobdiff - net/core/skbuff.c
[SK_BUFF]: Adjust the zeroing up to tail in __alloc_skb too
[~andy/linux] / net / core / skbuff.c
index a203bedefe098cd4558e0c61965bfac8ff6929bf..64caee46291b74f1c1ea2c44cad2d20442c02ae4 100644 (file)
@@ -164,7 +164,10 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
        if (!data)
                goto nodata;
 
-       memset(skb, 0, offsetof(struct sk_buff, truesize));
+       /*
+        * See comment in sk_buff definition, just before the 'tail' member
+        */
+       memset(skb, 0, offsetof(struct sk_buff, tail));
        skb->truesize = size + sizeof(struct sk_buff);
        atomic_set(&skb->users, 1);
        skb->head = data;