All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexey Kodanev <alexey.kodanev@oracle.com>,
	Neil Horman <nhorman@tuxdriver.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [PATCH net] sch_netem: fix skb leak in netem_enqueue()
Date: Mon, 05 Mar 2018 07:13:38 -0800	[thread overview]
Message-ID: <1520262818.109662.1.camel@gmail.com> (raw)
In-Reply-To: <4a06d0d1-6518-c7d0-f947-f427cf3688d4@oracle.com>

On Mon, 2018-03-05 at 15:57 +0300, Alexey Kodanev wrote:
> 
> +static inline void __qdisc_drop_all(struct sk_buff *skb,
> +                                   struct sk_buff **to_free)
> +{
> +       struct sk_buff *first = skb;
> +
> +       while (skb->next)
> +               skb = skb->next;
> +
> +       skb->next = *to_free;
> +       *to_free = first;
> +}

You probably can leverage what I did for commit bec3cfdca36bf43cfa
("net: skb_segment() provides list head and tail")
to avoid the iteration.

  reply	other threads:[~2018-03-05 15:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 18:16 [PATCH net] sch_netem: fix skb leak in netem_enqueue() Alexey Kodanev
2018-03-02 18:44 ` Stephen Hemminger
2018-03-03  3:30   ` Eric Dumazet
2018-03-03 12:20 ` Neil Horman
2018-03-05 12:57   ` Alexey Kodanev
2018-03-05 15:13     ` Eric Dumazet [this message]
2018-03-05 15:40       ` Alexey Kodanev
2018-03-05 23:11     ` Neil Horman

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=1520262818.109662.1.camel@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=alexey.kodanev@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.