From: John Fastabend <john.fastabend@gmail•com>
To: xiyou.wangcong@gmail•com, davem@davemloft•net, eric.dumazet@gmail•com
Cc: netdev@vger•kernel.org, jhs@mojatatu•com
Subject: [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases
Date: Tue, 16 Sep 2014 00:33:42 -0700 [thread overview]
Message-ID: <20140916073341.2597.36240.stgit@nitbit.x32> (raw)
This ensures the tcf_exts_init() is called for all cases.
Signed-off-by: John Fastabend <john.r.fastabend@intel•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],
next reply other threads:[~2014-09-16 7:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 7:33 John Fastabend [this message]
2014-09-16 16:26 ` [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases Cong Wang
2014-09-16 20:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140916073341.2597.36240.stgit@nitbit.x32 \
--to=john.fastabend@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=jhs@mojatatu$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox