netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netem: memory leak
       [not found] <20050204231103.33325.qmail@web41510.mail.yahoo.com>
@ 2005-02-04 23:31 ` Stephen Hemminger
  2005-02-07  6:09   ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2005-02-04 23:31 UTC (permalink / raw)
  To: David S. Miller; +Cc: js si, netem, netdev

Good catch.. netem needs to free skb's that are dropped due to loss
simulation.

diff -Nru a/net/sched/sch_netem.c b/net/sched/sch_netem.c
--- a/net/sched/sch_netem.c	2005-02-04 15:30:13 -08:00
+++ b/net/sched/sch_netem.c	2005-02-04 15:30:13 -08:00
@@ -177,6 +177,7 @@
 	if (q->loss && q->loss >= get_crandom(&q->loss_cor)) {
 		pr_debug("netem_enqueue: random loss\n");
 		sch->qstats.drops++;
+		kfree_skb(skb);
 		return 0;	/* lie about loss so TCP doesn't know */
 	}
 

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

* Re: [PATCH] netem: memory leak
  2005-02-04 23:31 ` [PATCH] netem: memory leak Stephen Hemminger
@ 2005-02-07  6:09   ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2005-02-07  6:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: nistnet_user, netem, netdev

On Fri, 4 Feb 2005 15:31:08 -0800
Stephen Hemminger <shemminger@osdl.org> wrote:

> Good catch.. netem needs to free skb's that are dropped due to loss
> simulation.

Applied to 2.6.x and backported to 2.4.x, thanks Stephen.

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

end of thread, other threads:[~2005-02-07  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050204231103.33325.qmail@web41510.mail.yahoo.com>
2005-02-04 23:31 ` [PATCH] netem: memory leak Stephen Hemminger
2005-02-07  6:09   ` David S. Miller

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