Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / net / sched / sch_gred.c
index e1afe0c..c65c831 100644 (file)
@@ -384,6 +384,9 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
        struct gred_sched *table = qdisc_priv(sch);
        struct gred_sched_data *q;
 
+       if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog))
+               return -EINVAL;
+
        if (table->tab[dp] == NULL) {
                table->tab[dp] = kzalloc(sizeof(*q), GFP_ATOMIC);
                if (table->tab[dp] == NULL)