summaryrefslogtreecommitdiff
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2012-04-15 23:24:46 -0500
committerClark Williams <williams@redhat.com>2012-04-15 23:24:46 -0500
commit8e9c931b8e4150f3c5aaab7e4639cd507c30477c (patch)
tree4c77bef833db938a950c60095f628acc1ebff50a /net/core/skbuff.c
parent3524a83e5459ae4ba42f9bf098bb736b99b88695 (diff)
parente816b57a337ea3b755de72bec38c10c864f23015 (diff)
Merge commit 'v3.4-rc3' into rt-3.4-rc3-rt4v3.4-rc3-rt4
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index baf8d281152c..e59840010d45 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -952,9 +952,11 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
goto adjust_others;
}
- data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
+ data = kmalloc(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
+ gfp_mask);
if (!data)
goto nodata;
+ size = SKB_WITH_OVERHEAD(ksize(data));
/* Copy only real data... and, alas, header. This should be
* optimized for the cases when header is void.