From: Jamal Hadi Salim Date: Tue, 15 May 2007 08:23:46 +0000 (-0700) Subject: [PATCH] NET_SCHED: prio qdisc boundary condition X-Git-Tag: v2.6.21.2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b890c17f74b976f82e38b84d29724212fccb91a;p=thirdparty%2Fkernel%2Fstable.git [PATCH] 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: Chris Wright --- diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index de889f23f22a5..a86f36b07375e 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -74,7 +74,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];