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 <j...@mojatatu.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Signed-off-by: Cong Wang <cw...@twopensource.com> --- net/sched/act_mirred.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index a42a3b2..2685450 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; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html