From 7b890c17f74b976f82e38b84d29724212fccb91a Mon Sep 17 00:00:00 2001 From: Jamal Hadi Salim Date: Tue, 15 May 2007 01:23:46 -0700 Subject: [PATCH] [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 --- net/sched/sch_prio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.47.2