netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next] net: gso_skb is now a list, needs a proper destructor
  2014-09-02 23:51 [PATCH net-next] net: gso_skb is now a list, needs a proper destructor Eric Dumazet
@ 2014-09-02 22:06 ` David Miller
  2014-09-03 10:33   ` Jesper Dangaard Brouer
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2014-09-02 22:06 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 02 Sep 2014 16:51:43 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> gso_skb can now be a list of skbs.
> 
> Qdisc destructors have to take care of it, or we can leak skbs.
> 
> Fixes: ce93718fb7cd ("net: Don't keep around original SKB when we software segment GSO frames.")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks Eric.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net-next] net: gso_skb is now a list, needs a proper destructor
@ 2014-09-02 23:51 Eric Dumazet
  2014-09-02 22:06 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2014-09-02 23:51 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

gso_skb can now be a list of skbs.

Qdisc destructors have to take care of it, or we can leak skbs.

Fixes: ce93718fb7cd ("net: Don't keep around original SKB when we software segment GSO frames.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/sched/sch_generic.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 5b261e91bdbd..19696ebe9ebc 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -621,7 +621,7 @@ void qdisc_reset(struct Qdisc *qdisc)
 		ops->reset(qdisc);
 
 	if (qdisc->gso_skb) {
-		kfree_skb(qdisc->gso_skb);
+		kfree_skb_list(qdisc->gso_skb);
 		qdisc->gso_skb = NULL;
 		qdisc->q.qlen = 0;
 	}
@@ -657,7 +657,7 @@ void qdisc_destroy(struct Qdisc *qdisc)
 	module_put(ops->owner);
 	dev_put(qdisc_dev(qdisc));
 
-	kfree_skb(qdisc->gso_skb);
+	kfree_skb_list(qdisc->gso_skb);
 	/*
 	 * gen_estimator est_timer() might access qdisc->q.lock,
 	 * wait a RCU grace period before freeing qdisc.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: gso_skb is now a list, needs a proper destructor
  2014-09-02 22:06 ` David Miller
@ 2014-09-03 10:33   ` Jesper Dangaard Brouer
  0 siblings, 0 replies; 3+ messages in thread
From: Jesper Dangaard Brouer @ 2014-09-03 10:33 UTC (permalink / raw)
  To: David Miller; +Cc: brouer, eric.dumazet, netdev

On Tue, 02 Sep 2014 15:06:04 -0700 (PDT) David Miller <davem@davemloft.net> wrote:

> Applied, thanks Eric.

I didn't see this patch the git tree, when I posted a similar fix.
So, just ignore my similar patch.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-03 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02 23:51 [PATCH net-next] net: gso_skb is now a list, needs a proper destructor Eric Dumazet
2014-09-02 22:06 ` David Miller
2014-09-03 10:33   ` Jesper Dangaard Brouer

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).