Преглед на файлове

[PKT_SCHED]: netetm: trap infinite loop hange on qlen underflow

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 <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger преди 20 години
родител
ревизия
8cbe1d46d6
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      net/sched/sch_generic.c

+ 1 - 0
net/sched/sch_generic.c

@@ -179,6 +179,7 @@ requeue:
 		netif_schedule(dev);
 		return 1;
 	}
+	BUG_ON((int) q->q.qlen < 0);
 	return q->q.qlen;
 }