[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180307.111858.1392479172536267510.davem@davemloft.net>
Date: Wed, 07 Mar 2018 11:18:58 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: alexey.kodanev@...cle.com
Cc: netdev@...r.kernel.org, nhorman@...driver.com,
stephen@...workplumber.org, edumazet@...gle.com
Subject: Re: [PATCH net v3] sch_netem: fix skb leak in netem_enqueue()
From: Alexey Kodanev <alexey.kodanev@...cle.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.kodanev@...cle.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!
Powered by blists - more mailing lists