diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-19 09:48:59 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:31 -0400 |
commit | ca0605a7c8a42379c695308944b3ae82a85479f1 (patch) | |
tree | fac6473d6c27587645eb33da9cbf4ed6ae61b59f /net/core/skbuff.c | |
parent | 4305b541357ddbd205aa145dc378926b7cb12283 (diff) |
[SK_BUFF]: Adjust the zeroing up to tail in __alloc_skb too
I did it just in alloc_skb_from_cache, forgot __alloc_skb, fixed now.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-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; |