From: John Fastabend Date: Tue, 16 Sep 2014 07:33:42 +0000 (-0700) Subject: net: sched: cls_cgroup need tcf_exts_init in all cases X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f6c38e70b6c7ea379394a755fe76e09996f5370;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Cong Wang Signed-off-by: David S. Miller --- 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, 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],