[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1520262818.109662.1.camel@gmail.com>
Date: Mon, 05 Mar 2018 07:13:38 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Alexey Kodanev <alexey.kodanev@...cle.com>,
Neil Horman <nhorman@...driver.com>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] sch_netem: fix skb leak in netem_enqueue()
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.
Powered by blists - more mailing lists