]> git.baikalelectronics.ru Git - kernel.git/commit
net: netem: fix error path for corrupted GSO frames
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 18 Oct 2019 16:16:57 +0000 (09:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Oct 2019 19:12:35 +0000 (12:12 -0700)
commit4b1f7c06eb04583725cbd33256151aac4875cf36
tree6e498c1ecc9037df177701ac780e2d5d65b9e82d
parent9b9ff52283215cd075950cca75d65bb585678c88
net: netem: fix error path for corrupted GSO frames

To corrupt a GSO frame we first perform segmentation.  We then
proceed using the first segment instead of the full GSO skb and
requeue the rest of the segments as separate packets.

If there are any issues with processing the first segment we
still want to process the rest, therefore we jump to the
finish_segs label.

Commit 7ae5da4371f7 ("net: netem: fix backlog accounting for
corrupted GSO frames") started using the pointer to the first
segment in the "rest of segments processing", but as mentioned
above the first segment may had already been freed at this point.

Backlog corrections for parent qdiscs have to be adjusted.

Fixes: 7ae5da4371f7 ("net: netem: fix backlog accounting for corrupted GSO frames")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Ben Hutchings <ben@decadent.org.uk>
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>
net/sched/sch_netem.c