netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexey.kodanev@oracle.com
Cc: netdev@vger.kernel.org, nhorman@tuxdriver.com,
	stephen@networkplumber.org, edumazet@google.com
Subject: Re: [PATCH net v3] sch_netem: fix skb leak in netem_enqueue()
Date: Wed, 07 Mar 2018 11:18:58 -0500 (EST)	[thread overview]
Message-ID: <20180307.111858.1392479172536267510.davem@davemloft.net> (raw)
In-Reply-To: <1520272374-25124-1-git-send-email-alexey.kodanev@oracle.com>

From: Alexey Kodanev <alexey.kodanev@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.kodanev@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!

      parent reply	other threads:[~2018-03-07 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05 17:52 [PATCH net v3] sch_netem: fix skb leak in netem_enqueue() Alexey Kodanev
2018-03-05 23:43 ` Neil Horman
2018-03-07 16:18 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307.111858.1392479172536267510.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexey.kodanev@oracle.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).