summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-04-26 12:00:00 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-26 12:00:00 -0700
commit6876a18d3361e1893187970e1881a1d88d894d3f (patch)
treec79dfb4843b82d9346cae1dce68d9b1cfece1715 /net/sched
parent0ea1041bfa3aa2971f858edd9e05477c2d3d54a0 (diff)
parentbbd6f0a948139970f4a615dff189d9a503681a39 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_taprio.c6
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;
}