Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread David Miller
I prefer the two-liner suggested by Cong as well.

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Jakub Kicinski
On Thu, 21 Mar 2019 11:26:56 -0700, Cong Wang wrote: > On Thu, Mar 21, 2019 at 11:22 AM Jakub Kicinski wrote: > > On Thu, 21 Mar 2019 11:05:21 -0700, Cong Wang wrote: > > > On Wed, Mar 20, 2019 at 11:12 AM John Hurley wrote: > > > > > > > > A new mirred action is created by the tcf_mirred_init

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Cong Wang
On Thu, Mar 21, 2019 at 11:22 AM Jakub Kicinski wrote: > > On Thu, 21 Mar 2019 11:05:21 -0700, Cong Wang wrote: > > On Wed, Mar 20, 2019 at 11:12 AM John Hurley > > wrote: > > > > > > A new mirred action is created by the tcf_mirred_init function. This > > > contains a list head struct which is

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Jakub Kicinski
On Thu, 21 Mar 2019 11:05:21 -0700, Cong Wang wrote: > On Wed, Mar 20, 2019 at 11:12 AM John Hurley > wrote: > > > > A new mirred action is created by the tcf_mirred_init function. This > > contains a list head struct which is inserted into a global list on > > successful creation of a new action

Re: [PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-21 Thread Cong Wang
On Wed, Mar 20, 2019 at 11:12 AM John Hurley wrote: > > A new mirred action is created by the tcf_mirred_init function. This > contains a list head struct which is inserted into a global list on > successful creation of a new action. However, after a creation, it is > still possible to error out i

[PATCH net 1/1] net: sched: fix cleanup NULL pointer exception in act_mirr

2019-03-20 Thread John Hurley
A new mirred action is created by the tcf_mirred_init function. This contains a list head struct which is inserted into a global list on successful creation of a new action. However, after a creation, it is still possible to error out if the egress device does not exist. This calls the act_mirr cle