diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/skbuff.c | 4 |
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, | |||
952 | goto adjust_others; | 952 | goto adjust_others; |
953 | } | 953 | } |
954 | 954 | ||
955 | data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); | 955 | data = kmalloc(size + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)), |
956 | gfp_mask); | ||
956 | if (!data) | 957 | if (!data) |
957 | goto nodata; | 958 | goto nodata; |
959 | size = SKB_WITH_OVERHEAD(ksize(data)); | ||
958 | 960 | ||
959 | /* Copy only real data... and, alas, header. This should be | 961 | /* Copy only real data... and, alas, header. This should be |
960 | * optimized for the cases when header is void. | 962 | * optimized for the cases when header is void. |