From: Jamal Hadi Salim Date: Mon, 14 May 2007 09:57:19 +0000 (-0700) Subject: [NET_SCHED]: prio qdisc boundary condition X-Git-Tag: v2.6.22-rc2~110^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3e5c2d3bdbe2c047b9853c4248f881f5ac645c89;p=linux-2.6-omap-h63xx.git [NET_SCHED]: prio qdisc boundary condition This fixes an out-of-boundary condition when the classified band equals q->bands. Caught by Alexey Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 269a6e17c6c..6d7542c26e4 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -75,7 +75,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) band = res.classid; } band = TC_H_MIN(band) - 1; - if (band > q->bands) + if (band >= q->bands) return q->queues[q->prio2band[0]]; return q->queues[band];