]> git.baikalelectronics.ru Git - kernel.git/commit
net-gro: Fix GRO flush when receiving a GSO packet.
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 2 Apr 2019 06:16:03 +0000 (08:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 04:40:52 +0000 (21:40 -0700)
commit3ec4f1e3f1ec59952422f47f0565034db915e1a1
treeab0fa8ad04d27c2bd711bcd8b52f5eb3b628624c
parent194a025b26000f8d3a59ea84f4a23830cb8ca7b2
net-gro: Fix GRO flush when receiving a GSO packet.

Currently we may merge incorrectly a received GSO packet
or a packet with frag_list into a packet sitting in the
gro_hash list. skb_segment() may crash case because
the assumptions on the skb layout are not met.
The correct behaviour would be to flush the packet in the
gro_hash list and send the received GSO packet directly
afterwards. Commit 48c54b57d693a ("net-gro: avoid reorders")
sets NAPI_GRO_CB(skb)->flush in this case, but this is not
checked before merging. This patch makes sure to check this
flag and to not merge in that case.

Fixes: 48c54b57d693a ("net-gro: avoid reorders")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c