diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1d92acc0777b..661a07746e94 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1649,9 +1649,12 @@ static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen) | |||
1649 | static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, | 1649 | static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, |
1650 | unsigned int offset) | 1650 | unsigned int offset) |
1651 | { | 1651 | { |
1652 | if (!pskb_may_pull(skb, hlen)) | ||
1653 | return NULL; | ||
1654 | |||
1652 | NAPI_GRO_CB(skb)->frag0 = NULL; | 1655 | NAPI_GRO_CB(skb)->frag0 = NULL; |
1653 | NAPI_GRO_CB(skb)->frag0_len = 0; | 1656 | NAPI_GRO_CB(skb)->frag0_len = 0; |
1654 | return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL; | 1657 | return skb->data + offset; |
1655 | } | 1658 | } |
1656 | 1659 | ||
1657 | static inline void *skb_gro_mac_header(struct sk_buff *skb) | 1660 | static inline void *skb_gro_mac_header(struct sk_buff *skb) |