[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 04 Apr 2016 11:07:43 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: netdev@...r.kernel.org, dvyukov@...gle.com,
Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: [Patch net] net_sched: fix a memory leak in tc action
On Mon, 2016-04-04 at 10:32 -0700, Cong Wang wrote:
> Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions")
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Tested-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
> include/net/act_api.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/net/act_api.h b/include/net/act_api.h
> index 2a19fe1..03e322b 100644
> --- a/include/net/act_api.h
> +++ b/include/net/act_api.h
> @@ -135,6 +135,7 @@ void tcf_hashinfo_destroy(const struct tc_action_ops *ops,
> static inline void tc_action_net_exit(struct tc_action_net *tn)
> {
> tcf_hashinfo_destroy(tn->ops, tn->hinfo);
> + kfree(tn->hinfo);
> }
>
> int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,
Looks good to me, although the kfree() might be put in
cf_hashinfo_destroy() (at one place instead of being inlined in all call
points)
Powered by blists - more mailing lists