aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-12 19:41:23 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-12 19:41:23 -0400
commit011e3c63251be832d23df9f0697626ab7b354d02 (patch)
tree2cad5b58c274c93ae49d9b58fb15d784d4dfd78f /net/core/skbuff.c
parentnet/ipv6/exthdrs.c: Strict PadN option checking (diff)
parentMerge branch 'akpm' (Andrew's patch-bomb) (diff)
downloadlinux-dev-011e3c63251be832d23df9f0697626ab7b354d02.tar.xz
linux-dev-011e3c63251be832d23df9f0697626ab7b354d02.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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 a396a6926238..35b3a685e342 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -951,9 +951,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.