aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
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
parentc1412fce7eccae62b4de22494f6ab3ff8a90c0c6 (diff)
parentecca5c3acc0d0933d89abc44e60afb0cc8170e35 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/core')
-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,
951 goto adjust_others; 951 goto adjust_others;
952 } 952 }
953 953
954 data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); 954 data = kmalloc(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
955 gfp_mask);
955 if (!data) 956 if (!data)
956 goto nodata; 957 goto nodata;
958 size = SKB_WITH_OVERHEAD(ksize(data));
957 959
958 /* Copy only real data... and, alas, header. This should be 960 /* Copy only real data... and, alas, header. This should be
959 * optimized for the cases when header is void. 961 * optimized for the cases when header is void.