net: netem: correct the parent's backlog when corrupted packet was dropped
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 18 Oct 2019 16:16:58 +0000 (09:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 09:24:34 +0000 (10:24 +0100)
commit37b41ca445947ab520fff9fecdb5163c5c3d1e98
treefd425b2e5f6d1ffee145cba13f415a19a1beca62
parent21a554f954c0b58049bbfd52bbaf67c2eca0e9ca
net: netem: correct the parent's backlog when corrupted packet was dropped

[ Upstream commit e0ad032e144731a5928f2d75e91c2064ba1a764c ]

If packet corruption failed we jump to finish_segs and return
NET_XMIT_SUCCESS. Seeing success will make the parent qdisc
increment its backlog, that's incorrect - we need to return
NET_XMIT_DROP.

Fixes: 6071bd1aa13e ("netem: Segment GSO packets on enqueue")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_netem.c