]> git.baikalelectronics.ru Git - kernel.git/commit
net: keep original skb which only needs header checking during software GSO
authorJason Wang <jasowang@redhat.com>
Fri, 19 Sep 2014 08:04:38 +0000 (16:04 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Sep 2014 18:57:08 +0000 (14:57 -0400)
commitcefe262a25d2dcbd830c83a05e17a9d77350120d
treeddc86a719057aeeec4616b4a3d762418c11ea3e9
parent2b0b102c1cac85c83307ecaecefb8d820dc0bdb9
net: keep original skb which only needs header checking during software GSO

Commit 9be6b2c047a58fca1cffcb2996d475758e5f15ab ("net: Don't keep
around original SKB when we software segment GSO frames") frees the
original skb after software GSO even for dodgy gso skbs. This breaks
the stream throughput from untrusted sources, since only header
checking was done during software GSO instead of a true
segmentation. This patch fixes this by freeing the original gso skb
only when it was really segmented by software.

Fixes 9be6b2c047a58fca1cffcb2996d475758e5f15ab ("net: Don't keep
around original SKB when we software segment GSO frames.")

Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c