]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sched/sch_hhf.c
Merge tag 'please-pull-ia64_for_5.4' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / net / sched / sch_hhf.c
index cee6971c1c8249a68dd6b953948fa1fef21fce04..23cd1c873a2cfc24b907a8177e71dd68b0939701 100644 (file)
@@ -531,7 +531,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);