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 v2 4/4] net: sched: cls_fw: add missing tcf_exts_init call in fw_change()
Date: Mon, 15 Sep 2014 23:31:42 -0700 [thread overview]
Message-ID: <20140916063141.2905.59421.stgit@nitbit.x32> (raw)
In-Reply-To: <20140916063024.2905.55403.stgit@nitbit.x32>
When allocating a new structure we also need to call tcf_exts_init
to initialize exts.
A follow up patch might be in order to remove some of this code
and do tcf_exts_assign(). With this we could remove the
tcf_exts_init/tcf_exts_change pattern for some of the classifiers.
As part of the future tcf_actions RCU series this will need to be
done. For now fix the call here.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---
net/sched/cls_fw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 006b45a..2650285 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -264,6 +264,8 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
#endif /* CONFIG_NET_CLS_IND */
fnew->tp = f->tp;
+ tcf_exts_init(&fnew->exts, TCA_FW_ACT, TCA_FW_POLICE);
+
err = fw_change_attrs(net, tp, fnew, tb, tca, base, ovr);
if (err < 0) {
kfree(fnew);
next prev parent reply other threads:[~2014-09-16 6:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 6:30 [net-next PATCH v2 1/4] net: sched: fix unsued cpu variable John Fastabend
2014-09-16 6:30 ` [net-next PATCH v2 2/4] net: sched: cls_u32 add missing rcu_assign_pointer and annotation John Fastabend
2014-09-16 20:00 ` David Miller
2014-09-16 6:31 ` [net-next PATCH v2 3/4] net: sched: cls_cgroup fix possible memory leak of 'new' John Fastabend
2014-09-16 16:19 ` Cong Wang
2014-09-16 20:00 ` David Miller
2014-09-16 6:31 ` John Fastabend [this message]
2014-09-16 16:23 ` [net-next PATCH v2 4/4] net: sched: cls_fw: add missing tcf_exts_init call in fw_change() Cong Wang
2014-09-16 20:00 ` David Miller
2014-09-16 20:27 ` John Fastabend
2014-09-16 16:17 ` [net-next PATCH v2 1/4] net: sched: fix unsued cpu variable Cong Wang
2014-09-16 20:00 ` 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=20140916063141.2905.59421.stgit@nitbit.x32 \
--to=john.fastabend@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.