net: sched: fix possible null pointer deref in tcf_block_put
Subsystems (3)
Jiri Pirko
maintainerPATCH 1/1 net: sched: fix possible null pointer deref in tcf_block_put
From: Jiri Pirko <[email protected]>
We need to check block for being null in both tcf_block_put and tcf_block_put_ext.
Fixes 343723dd51ef ("net: sched: fix clsact init error path")
Reported-by Prashant Bhole <[email protected]>
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
@@ -379,6 +379,8 @@ void tcf_block_put(struct tcf_block *block) {struct tcf_block_ext_info ei = {0 , }; +if (!block) +return ;tcf_block_put_ext (block, block->q, &ei); }
Signature · 1 line
2.9.5
From: Jiri Pirko <[email protected]>
Date: Thu, 21 Dec 2017 13:13:59 +0100
Quoted 8 lines
From: Jiri Pirko <[email protected]>
We need to check block for being null in both
tcf_block_putandtcf_block_put_ext.Fixes 343723dd51ef ("net: sched: fix clsact init error path")Reported-by Prashant Bhole <[email protected]>Signed-off-by Jiri Pirko <[email protected]>
Applied.