From: Alexey Kodanev <alexey.koda...@oracle.com> Date: Mon, 5 Mar 2018 20:52:54 +0300
> When we exceed current packets limit and we have more than one > segment in the list returned by skb_gso_segment(), netem drops > only the first one, skipping the rest, hence kmemleak reports: ... > Fix it by adding the rest of the segments, if any, to skb 'to_free' > list. Add new __qdisc_drop_all() and qdisc_drop_all() functions > because they can be useful in the future if we need to drop segmented > GSO packets in other places. > > Fixes: 6071bd1aa13e ("netem: Segment GSO packets on enqueue") > Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> > --- > > v3: use skb->prev to find the tail of the list. skb->prev can be NULL > for not segmented skbs, so check it too. > > v2: add new __qdisc_drop_all() and qdisc_drop_all(), and use > qdisc_drop_all() in sch_netem. Applied and queued up for -stable, thanks!