summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2014-09-16 08:31:42 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-16 21:59:36 +0200
commite1f93eb06c3a13b29b1980f27dada960503cd49e (patch)
tree847181684195e921e424701be3ec025fdeb092e1 /net/sched
parentnet: sched: cls_cgroup fix possible memory leak of 'new' (diff)
downloadlinux-e1f93eb06c3a13b29b1980f27dada960503cd49e.tar.xz
linux-e1f93eb06c3a13b29b1980f27dada960503cd49e.zip
net: sched: cls_fw: add missing tcf_exts_init call in fw_change()
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. Fixes e35a8ee5993ba81fd6c0 ("net: sched: fw use RCU") Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_fw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 006b45a67fdd..2650285620ee 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);