From: Jamal Hadi Salim Date: Tue, 22 May 2007 23:03:30 +0000 (+0200) Subject: [NET_SCHED]: prio qdisc boundary condition X-Git-Tag: v2.6.16.52-rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2900960ba205f09ce3bfe2fd168dce048b061b25;p=thirdparty%2Fkernel%2Fstable.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 Signed-off-by: Adrian Bunk --- diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 337a050895ace..af007fd627d14 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -76,7 +76,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];