* [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases
@ 2014-09-16 7:33 John Fastabend
2014-09-16 16:26 ` Cong Wang
2014-09-16 20:26 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: John Fastabend @ 2014-09-16 7:33 UTC (permalink / raw)
To: xiyou.wangcong, davem, eric.dumazet; +Cc: netdev, jhs
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],
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases
2014-09-16 7:33 [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases John Fastabend
@ 2014-09-16 16:26 ` Cong Wang
2014-09-16 20:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2014-09-16 16:26 UTC (permalink / raw)
To: John Fastabend
Cc: Cong Wang, David Miller, Eric Dumazet, netdev, Jamal Hadi Salim
On Tue, Sep 16, 2014 at 12:33 AM, John Fastabend
<john.fastabend@gmail.com> wrote:
> This ensures the tcf_exts_init() is called for all cases.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Fixes: commit 952313bd62589cae216a57 ("net: sched: cls_cgroup use RCU")
Acked-by: Cong Wang <cwang@twopensource.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases
2014-09-16 7:33 [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases John Fastabend
2014-09-16 16:26 ` Cong Wang
@ 2014-09-16 20:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-09-16 20:26 UTC (permalink / raw)
To: john.fastabend; +Cc: xiyou.wangcong, eric.dumazet, netdev, jhs
From: John Fastabend <john.fastabend@gmail.com>
Date: Tue, 16 Sep 2014 00:33:42 -0700
> This ensures the tcf_exts_init() is called for all cases.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-16 20:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16 7:33 [net-next PATCH] net: sched: cls_cgroup need tcf_exts_init in all cases John Fastabend
2014-09-16 16:26 ` Cong Wang
2014-09-16 20:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).