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-Tag: v4.9.8~3769^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=636dba8e12d797357b2063981476390f11262c08;p=platform%2Fkernel%2Flinux-rpi3.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 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;