]> git.baikalelectronics.ru Git - kernel.git/commit
net: gro: fix a potential crash in skb_gro_reset_offset
authorEric Dumazet <edumazet@google.com>
Sat, 6 Oct 2012 22:28:06 +0000 (22:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 7 Oct 2012 18:49:17 +0000 (14:49 -0400)
commit4079ff0b74a47cbef251c5116e757a49659e228d
treefa3b345f2940b257f7c1b5b268f2ee52926bcbf5
parentf58d592faec1ea38ec96c66fa1365adff0610f93
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>
include/linux/netdevice.h
net/core/dev.c