Thread (10 messages) flat view 10 messages, 4 authors, 2017-09-11

Re: [patch net] net: sched: fix memleak for chain zero

From: Jakub Kicinski <hidden>
Date: 2017-09-06 17:38:14

On Wed,  6 Sep 2017 13:14:19 +0200, Jiri Pirko wrote:
From: Jiri Pirko <redacted>

There's a memleak happening for chain 0. The thing is, chain 0 needs to
be always present, not created on demand. Therefore tcf_block_get upon
creation of block calls the tcf_chain_create function directly. The
chain is created with refcnt == 1, which is not correct in this case and
causes the memleak. So move the refcnt increment into tcf_chain_get
function even for the case when chain needs to be created.

Reported-by: Jakub Kicinski <redacted>
Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters")
Signed-off-by: Jiri Pirko <redacted>
Tested-by: Jakub Kicinski <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help