Re: [PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Vinicius Costa Gomes
Hi, Cong Wang writes: > On Mon, Sep 23, 2019 at 5:14 PM Vinicius Costa Gomes > wrote: >> @@ -417,12 +421,6 @@ static int cbs_init(struct Qdisc *sch, struct nlattr >> *opt, >> if (err) >> return err; >> >> - if (!q->offload) { >> - spin_lock(&cbs_list

Re: [PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Cong Wang
On Mon, Sep 23, 2019 at 5:14 PM Vinicius Costa Gomes wrote: > @@ -417,12 +421,6 @@ static int cbs_init(struct Qdisc *sch, struct nlattr > *opt, > if (err) > return err; > > - if (!q->offload) { > - spin_lock(&cbs_list_lock); > - list_add(&

[PATCH net v2] net/sched: cbs: Fix not adding cbs instance to list

2019-09-23 Thread Vinicius Costa Gomes
When removing a cbs instance when offloading is enabled, the crash below can be observed. The problem happens because that when offloading is enabled, the cbs instance is not added to the list. Also, the current code doesn't handle correctly the case when offload is disabled without removing the