DORMANTno replies

[PATCH] (1/3) netetm: trap infinite loop hange on qlen underflow

From: Stephen Hemminger <hidden>
Date: 2005-05-03 23:27:18

Due to bugs in netem (fixed by later patches), it is possible to get qdisc
qlen to go negative. If this happens the CPU ends up spinning forever
in qdisc_run(). So add a BUG_ON() to trap it.

Signed-off-by: Stephen Hemminger <redacted>

Index: netem-2.6.12-rc3/net/sched/sch_generic.c
===================================================================
--- netem-2.6.12-rc3.orig/net/sched/sch_generic.c	2005-05-03 10:55:50.000000000 -0700
+++ netem-2.6.12-rc3/net/sched/sch_generic.c	2005-05-03 10:56:01.000000000 -0700
@@ -179,6 +179,7 @@
 		netif_schedule(dev);
 		return 1;
 	}
+	BUG_ON((int) q->q.qlen < 0);
 	return q->q.qlen;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help