Skip to content

Commit

Permalink
net: sched: cls_cgroup need tcf_exts_init in all cases
Browse files Browse the repository at this point in the history
This ensures the tcf_exts_init() is called for all cases.

Fixes: 952313b ("net: sched: cls_cgroup use RCU")
Signed-off-by: John Fastabend <[email protected]>
Acked-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jrfastab authored and davem330 committed Sep 16, 2014
1 parent 2d9d65f commit 9f6c38e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/sched/cls_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 9f6c38e

Please sign in to comment.