On Mon 13 Aug 2018 at 23:00, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov <vla...@mellanox.com> wrote: >> diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c >> index 89a761395c94..acea3feae762 100644 >> --- a/net/sched/act_ife.c >> +++ b/net/sched/act_ife.c > ... >> @@ -548,6 +546,8 @@ static int tcf_ife_init(struct net *net, struct nlattr >> *nla, >> >> if (exists) >> spin_unlock_bh(&ife->tcf_lock); >> + tcf_idr_release(*a, bind); >> + >> kfree(p); >> return err; >> } > > With this change, you seem release it twice when nla_parse_nested() fails > for ACT_P_CREATED case...?
Thank you, great catch! > > Looks like what you want is the following? > > if (err) { > tcf_idr_release(*a, bind); > kfree(p); > return err; > } Yes. Sending the fix.