net: sched: fix block->refcnt decrement
Subsystems (3)
Jiri Pirko
maintainerPATCH 1/1 net: sched: fix block->refcnt decrement
From: Jiri Pirko <[email protected]>
Currently the refcnt is never decremented in case the value is not 1. Fix it by adding decrement in case the refcnt is not 1.
Reported-by Vlad Buslov <[email protected]>
Fixes f71e0ca4db18 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by Jiri Pirko <[email protected]>
--- net/sched/cls_api.c | 2 ++ 1 file changed, 2 insertions(+)
net/sched/cls_api.c +2 -0
@@ -780,6 +780,8 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q, block->refcnt--;if (list_empty (&block->chain_list))kfree (block); + }else { + block->refcnt--; } }EXPORT_SYMBOL (tcf_block_put_ext);
Signature · 1 line
2.14.4
From: Jiri Pirko <[email protected]>
Date: Wed, 8 Aug 2018 14:04:13 +0200
Quoted 8 lines
From: Jiri Pirko <[email protected]>
Currently the refcnt is never decremented in case the value is not 1. Fix it by adding decrement in case the refcnt is not 1.
Reported-by Vlad Buslov <[email protected]>Fixes f71e0ca4db18 ("net: sched: Avoid implicit chain 0 creation")Signed-off-by Jiri Pirko <[email protected]>
Applied.