aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
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,
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.