Commit 9f6c38e7 authored by John Fastabend's avatar John Fastabend Committed by David S. Miller

net: sched: cls_cgroup need tcf_exts_init in all cases

This ensures the tcf_exts_init() is called for all cases.

Fixes: 952313bd ("net: sched: cls_cgroup use RCU")
Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Acked-by: default avatarCong Wang <cwang@twopensource.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2d9d65fa
...@@ -116,12 +116,11 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb, ...@@ -116,12 +116,11 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
if (!new) if (!new)
return -ENOBUFS; return -ENOBUFS;
if (head) { tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
if (head)
new->handle = head->handle; new->handle = head->handle;
} else { else
tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
new->handle = handle; new->handle = handle;
}
new->tp = tp; new->tp = tp;
err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS], err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment