From: WANG Cong Date: Fri, 31 Jul 2015 00:12:20 +0000 (-0700) Subject: act_mirred: avoid calling tcf_hash_release() when binding X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=636dba8e12d797357b2063981476390f11262c08;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Daniel Borkmann Signed-off-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- 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;