Loading net/sched/sch_gred.c +3 −6 Original line number Original line Diff line number Diff line Loading @@ -451,12 +451,9 @@ static int gred_change(struct Qdisc *sch, struct rtattr *opt) return -EINVAL; return -EINVAL; ctl = RTA_DATA(tb[TCA_GRED_PARMS-1]); ctl = RTA_DATA(tb[TCA_GRED_PARMS-1]); if (ctl->DP > MAX_DPs-1 ) { /* misbehaving is punished! Put in the default drop probability */ if (ctl->DP >= table->DPs) DPRINTK("\nGRED: DP %u not in the proper range fixed. New DP " return -EINVAL; "set to default at %d\n",ctl->DP,table->def); ctl->DP=table->def; } if (table->tab[ctl->DP] == NULL) { if (table->tab[ctl->DP] == NULL) { table->tab[ctl->DP]=kmalloc(sizeof(struct gred_sched_data), table->tab[ctl->DP]=kmalloc(sizeof(struct gred_sched_data), Loading Loading
net/sched/sch_gred.c +3 −6 Original line number Original line Diff line number Diff line Loading @@ -451,12 +451,9 @@ static int gred_change(struct Qdisc *sch, struct rtattr *opt) return -EINVAL; return -EINVAL; ctl = RTA_DATA(tb[TCA_GRED_PARMS-1]); ctl = RTA_DATA(tb[TCA_GRED_PARMS-1]); if (ctl->DP > MAX_DPs-1 ) { /* misbehaving is punished! Put in the default drop probability */ if (ctl->DP >= table->DPs) DPRINTK("\nGRED: DP %u not in the proper range fixed. New DP " return -EINVAL; "set to default at %d\n",ctl->DP,table->def); ctl->DP=table->def; } if (table->tab[ctl->DP] == NULL) { if (table->tab[ctl->DP] == NULL) { table->tab[ctl->DP]=kmalloc(sizeof(struct gred_sched_data), table->tab[ctl->DP]=kmalloc(sizeof(struct gred_sched_data), Loading