summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorWANG Cong2015-07-31 02:12:20 +0200
committerDavid S. Miller2015-08-03 23:13:28 +0200
commit636dba8e12d797357b2063981476390f11262c08 (patch)
tree814c6863e9f7d608591b20f13ed7634da8d46ed5 /net/sched
parentopenvswitch: Fix L4 checksum handling when dealing with IP fragments (diff)
downloadkernel-qcow2-linux-636dba8e12d797357b2063981476390f11262c08.tar.gz
kernel-qcow2-linux-636dba8e12d797357b2063981476390f11262c08.tar.xz
kernel-qcow2-linux-636dba8e12d797357b2063981476390f11262c08.zip
act_mirred: avoid calling tcf_hash_release() when binding
When we share an action within a filter, the bind refcnt should increase, therefore we should not call tcf_hash_release(). Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-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/act_mirred.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index a42a3b257226..268545050ddb 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -98,6 +98,8 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla,
return ret;
ret = ACT_P_CREATED;
} else {
+ if (bind)
+ return 0;
if (!ovr) {
tcf_hash_release(a, bind);
return -EEXIST;