Re: [PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-22 Thread Jamal Hadi Salim
On 17-01-20 01:20 AM, Cong Wang wrote: On Wed, Jan 18, 2017 at 3:33 AM, Jamal Hadi Salim wrote: On 17-01-17 01:17 PM, Cong Wang wrote: I did. The issue there (after your original patch) was destroy() would decrement the refcount to zero and a GET was essentially translated to a DEL. Increm

Re: [PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-19 Thread Cong Wang
On Wed, Jan 18, 2017 at 3:33 AM, Jamal Hadi Salim wrote: > On 17-01-17 01:17 PM, Cong Wang wrote: >> >> Why this check for RTM_GETACTION? It does not make sense >> at least for the error case, that is, when tcf_action_get_1() fails >> in the middle of the loop, all the previous ones should be dest

Re: [PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-18 Thread Jamal Hadi Salim
On 17-01-17 01:17 PM, Cong Wang wrote: On Sun, Jan 15, 2017 at 7:14 AM, Jamal Hadi Salim wrote: diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 2095c83..e10456ef6f 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -900,8 +900,6 @@ static int tca_action_flush(struct net

Re: [PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-17 Thread Cong Wang
On Sun, Jan 15, 2017 at 7:14 AM, Jamal Hadi Salim wrote: > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > index 2095c83..e10456ef6f 100644 > --- a/net/sched/act_api.c > +++ b/net/sched/act_api.c > @@ -900,8 +900,6 @@ static int tca_action_flush(struct net *net, struct > nlattr *nla, >

Re: [PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-16 Thread David Miller
From: Jamal Hadi Salim Date: Sun, 15 Jan 2017 10:14:06 -0500 > From: Jamal Hadi Salim ... > Fixes: aecc5cefc389 ("net sched actions: fix GETing actions") > Signed-off-by: Jamal Hadi Salim Applied and queued up for -stable, thanks Jamal.

[PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Demonstrating the issue: .. add a drop action $sudo $TC actions add action drop index 10 .. retrieve it $ sudo $TC -s actions get action gact index 10 action order 1: gact action drop random type none pass val 0 index 10 ref 2 bind 0 installed 2