diff options
-rw-r--r-- | include/linux/skbuff.h | 3 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f5aa87e1e0c8..d89876b806a0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -202,10 +202,11 @@ struct skb_shared_info { | |||
202 | */ | 202 | */ |
203 | atomic_t dataref; | 203 | atomic_t dataref; |
204 | 204 | ||
205 | skb_frag_t frags[MAX_SKB_FRAGS]; | ||
206 | /* Intermediate layers must ensure that destructor_arg | 205 | /* Intermediate layers must ensure that destructor_arg |
207 | * remains valid until skb destructor */ | 206 | * remains valid until skb destructor */ |
208 | void * destructor_arg; | 207 | void * destructor_arg; |
208 | /* must be last field, see pskb_expand_head() */ | ||
209 | skb_frag_t frags[MAX_SKB_FRAGS]; | ||
209 | }; | 210 | }; |
210 | 211 | ||
211 | /* We divide dataref into two halves. The higher 16 bits hold references | 212 | /* We divide dataref into two halves. The higher 16 bits hold references |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 76d33ca5f037..7da58a25ad92 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -817,7 +817,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, | |||
817 | memcpy(data + nhead, skb->head, skb->tail - skb->head); | 817 | memcpy(data + nhead, skb->head, skb->tail - skb->head); |
818 | #endif | 818 | #endif |
819 | memcpy(data + size, skb_end_pointer(skb), | 819 | memcpy(data + size, skb_end_pointer(skb), |
820 | sizeof(struct skb_shared_info)); | 820 | offsetof(struct skb_shared_info, frags[skb_shinfo(skb)->nr_frags])); |
821 | 821 | ||
822 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) | 822 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) |
823 | get_page(skb_shinfo(skb)->frags[i].page); | 823 | get_page(skb_shinfo(skb)->frags[i].page); |