diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/skbuff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index a203bedefe09..64caee46291b 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -164,7 +164,10 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, | |||
164 | if (!data) | 164 | if (!data) |
165 | goto nodata; | 165 | goto nodata; |
166 | 166 | ||
167 | memset(skb, 0, offsetof(struct sk_buff, truesize)); | 167 | /* |
168 | * See comment in sk_buff definition, just before the 'tail' member | ||
169 | */ | ||
170 | memset(skb, 0, offsetof(struct sk_buff, tail)); | ||
168 | skb->truesize = size + sizeof(struct sk_buff); | 171 | skb->truesize = size + sizeof(struct sk_buff); |
169 | atomic_set(&skb->users, 1); | 172 | atomic_set(&skb->users, 1); |
170 | skb->head = data; | 173 | skb->head = data; |