Subject: Re: [PATCH][NET_SCHED] sch_prio: class statistics printing enabled

From: Patrick McHardy <[email-masked]>
Date: Wed, 31 Jan 2007 15:37:25 +0100

Jarek Poplawski wrote:
> +static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
> +				 struct gnet_dump *d)
> +{
> +	struct prio_sched_data *q = qdisc_priv(sch);
> +	struct Qdisc *cl_q;
> +
> +	if (cl - 1 > q->bands)
> +		return -1;

Thats not what I meant, it still hides the bug. Either do
nothing (don't check) or do BUG_ON(cl - 1 > q->bands).