diff options
author | David S. Miller <davem@davemloft.net> | 2021-04-26 12:00:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-26 12:00:00 -0700 |
commit | 6876a18d3361e1893187970e1881a1d88d894d3f (patch) | |
tree | c79dfb4843b82d9346cae1dce68d9b1cfece1715 /net/sched | |
parent | 0ea1041bfa3aa2971f858edd9e05477c2d3d54a0 (diff) | |
parent | bbd6f0a948139970f4a615dff189d9a503681a39 (diff) | |
download | linux-6876a18d3361e1893187970e1881a1d88d894d3f.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_taprio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 922ed6b91abb..5c91df52b8c2 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -945,6 +945,12 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, list_for_each_entry(entry, &new->entries, list) cycle = ktime_add_ns(cycle, entry->interval); + + if (!cycle) { + NL_SET_ERR_MSG(extack, "'cycle_time' can never be 0"); + return -EINVAL; + } + new->cycle_time = cycle; } |