diff options
author | John Fastabend <john.fastabend@gmail.com> | 2014-09-16 03:33:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-16 16:26:39 -0400 |
commit | 9f6c38e70b6c7ea379394a755fe76e09996f5370 (patch) | |
tree | 510acfc9db27281b4ec1d839d2b9fef41025a104 /net/sched/cls_cgroup.c | |
parent | 2d9d65fa4418b64112199449e90af226764537e4 (diff) |
net: sched: cls_cgroup need tcf_exts_init in all cases
This ensures the tcf_exts_init() is called for all cases.
Fixes: 952313bd62589cae216a57 ("net: sched: cls_cgroup use RCU")
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_cgroup.c')
-rw-r--r-- | net/sched/cls_cgroup.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 10c7ffde13e2..15c34d4ccd9e 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
@@ -116,12 +116,11 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb, | |||
116 | if (!new) | 116 | if (!new) |
117 | return -ENOBUFS; | 117 | return -ENOBUFS; |
118 | 118 | ||
119 | if (head) { | 119 | tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE); |
120 | if (head) | ||
120 | new->handle = head->handle; | 121 | new->handle = head->handle; |
121 | } else { | 122 | else |
122 | tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE); | ||
123 | new->handle = handle; | 123 | new->handle = handle; |
124 | } | ||
125 | 124 | ||
126 | new->tp = tp; | 125 | new->tp = tp; |
127 | err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS], | 126 | err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS], |