net: gro: fix a potential crash in skb_gro_reset_offset
Before accessing skb first fragment, better make sure there is one. This is probably not needed for old kernels, since an ethernet frame cannot contain only an ethernet header, but the recent GRO addition to tunnels makes this patch needed. Also skb_gro_reset_offset() can be static, it actually allows compiler to inline it. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
51ec04038c
commit
ca07e43e28
2 changed files with 8 additions and 7 deletions
|
|
@ -1663,7 +1663,6 @@ extern int netpoll_trap(void);
|
|||
#endif
|
||||
extern int skb_gro_receive(struct sk_buff **head,
|
||||
struct sk_buff *skb);
|
||||
extern void skb_gro_reset_offset(struct sk_buff *skb);
|
||||
|
||||
static inline unsigned int skb_gro_offset(const struct sk_buff *skb)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue