net: sched: cls_cgroup need tcf_exts_init in all cases
Subsystems (3)
PATCH 1/1 net: sched: cls_cgroup need tcf_exts_init in all cases
This ensures the tcf_exts_init() is called for all cases.
Signed-off-by John Fastabend <[email protected]>
--- net/sched/cls_cgroup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
net/sched/cls_cgroup.c +3 -4
@@ -116,12 +116,11 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,if (!new)return -ENOBUFS ; -if (head) { +tcf_exts_init (&new->exts,TCA_CGROUP_ACT ,TCA_CGROUP_POLICE ); +if (head) new->handle = head->handle; - }else { -tcf_exts_init (&new->exts,TCA_CGROUP_ACT ,TCA_CGROUP_POLICE ); +else new->handle = handle; - } new->tp = tp; err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS],
Quoted 3 lines · John Fastabend
This ensures the
tcf_exts_init()is called for all cases.Signed-off-by John Fastabend <[email protected]>
Fixes commit 952313bd62589cae216a57 ("net: sched: cls_cgroup use RCU")
Acked-by Cong Wang <[email protected]>
From: John Fastabend <[email protected]>
Date: Tue, 16 Sep 2014 00:33:42 -0700
Quoted 3 lines
This ensures the
tcf_exts_init()is called for all cases.Signed-off-by John Fastabend <[email protected]>
Applied, thanks.