Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -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) {
		new->handle = head->handle;
	} else {
	tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
	tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
	if (head)
		new->handle = head->handle;
	else
		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],