Re: [Patch net] net_sched: fix a memory leak of filter chain

2017-09-06 Thread Cong Wang
On Wed, Sep 6, 2017 at 12:38 AM, Jiri Pirko wrote: > Wed, Sep 06, 2017 at 07:03:10AM CEST, xiyou.wangc...@gmail.com wrote: >>tcf_chain_destroy() is called by tcf_block_put() and tcf_chain_put(). >>tcf_chain_put() is refcn'ed and paired with tcf_chain_get(), >>but tcf_block_put()

Re: [Patch net] net_sched: fix a memory leak of filter chain

2017-09-06 Thread Jiri Pirko
Wed, Sep 06, 2017 at 07:03:10AM CEST, xiyou.wangc...@gmail.com wrote: >tcf_chain_destroy() is called by tcf_block_put() and tcf_chain_put(). >tcf_chain_put() is refcn'ed and paired with tcf_chain_get(), >but tcf_block_put() is not, it should be paired with tcf_block_get() >and we still need to

[Patch net] net_sched: fix a memory leak of filter chain

2017-09-05 Thread Cong Wang
tcf_chain_destroy() is called by tcf_block_put() and tcf_chain_put(). tcf_chain_put() is refcn'ed and paired with tcf_chain_get(), but tcf_block_put() is not, it should be paired with tcf_block_get() and we still need to decrease the refcnt. However, tcf_block_put() is special, it stores the