summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2015-07-30 17:12:20 -0700
committerDavid S. Miller <davem@davemloft.net>2015-08-03 14:13:28 -0700
commit636dba8e12d797357b2063981476390f11262c08 (patch)
tree814c6863e9f7d608591b20f13ed7634da8d46ed5 /net/sched
parent3576fd794b38306e196498ac54bb3b21c32e1ae4 (diff)
downloadlinux-636dba8e12d797357b2063981476390f11262c08.tar.bz2
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;