diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c index 73a53c08091b..fa256f8038af 100644 --- a/net/sched/sch_hhf.c +++ b/net/sched/sch_hhf.c @@ -528,7 +528,7 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt) new_hhf_non_hh_weight = nla_get_u32(tb[TCA_HHF_NON_HH_WEIGHT]); non_hh_quantum = (u64)new_quantum * new_hhf_non_hh_weight; - if (non_hh_quantum > INT_MAX) + if (non_hh_quantum == 0 || non_hh_quantum > INT_MAX) return -EINVAL; sch_tree_lock(sch);