Re: [PATCH v3] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-16 Thread Du Cheng
Le Fri, Apr 16, 2021 at 10:14:52AM -0700, Cong Wang a écrit : > On Thu, Apr 15, 2021 at 4:17 PM Du Cheng wrote: > > diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c > > index 8287894541e3..abd6b176383c 100644 > > --- a/net/sched/sch_taprio.c > > +++ b/net/sched/sch_taprio.c > > @@ -901

Re: [PATCH v3] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-16 Thread Cong Wang
On Thu, Apr 15, 2021 at 4:17 PM Du Cheng wrote: > diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c > index 8287894541e3..abd6b176383c 100644 > --- a/net/sched/sch_taprio.c > +++ b/net/sched/sch_taprio.c > @@ -901,6 +901,10 @@ static int parse_taprio_schedule(struct taprio_sched *q, >

[PATCH v3] net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule

2021-04-15 Thread Du Cheng
There is a reproducible sequence from the userland that will trigger a WARN_ON() condition in taprio_get_start_time, which causes kernel to panic if configured as "panic_on_warn". Catch this during initialisation in parse_taprio_schedule to prevent this condition. Reported as bug on syzkaller: htt