Skip to content

Commit

Permalink
net: sched: cls_fw: add missing tcf_exts_init call in fw_change()
Browse files Browse the repository at this point in the history
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 e35a8ee ("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>
  • Loading branch information
John Fastabend authored and David S. Miller committed Sep 16, 2014
1 parent d14cbfc commit e1f93eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sched/cls_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e1f93eb

Please sign in to comment.