[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140916073341.2597.36240.stgit@nitbit.x32>
Date: Tue, 16 Sep 2014 00:33:42 -0700
From: John Fastabend <john.fastabend@...il.com>
To: xiyou.wangcong@...il.com, davem@...emloft.net,
eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, jhs@...atatu.com
Subject: [net-next PATCH] 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 <john.r.fastabend@...el.com>
---
net/sched/cls_cgroup.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 10c7ffd..15c34d4 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],
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists