summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-19 10:48:59 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:26:31 -0700
commitca0605a7c8a42379c695308944b3ae82a85479f1 (patch)
treefac6473d6c27587645eb33da9cbf4ed6ae61b59f /net/core
parent4305b541357ddbd205aa145dc378926b7cb12283 (diff)
downloadop-kernel-dev-ca0605a7c8a42379c695308944b3ae82a85479f1.zip
op-kernel-dev-ca0605a7c8a42379c695308944b3ae82a85479f1.tar.gz
[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')
-rw-r--r--net/core/skbuff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index a203bed..64caee4 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,
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;
OpenPOWER on IntegriCloud