net: sched: fix possible null pointer deref in tcf_block_put
We need to check block for being null in both tcf_block_put and
tcf_block_put_ext.
Fixes: 343723dd51
("net: sched: fix clsact init error path")
Reported-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0a3d805c9c
commit
4853f128c1
@ -379,6 +379,8 @@ void tcf_block_put(struct tcf_block *block)
|
|||||||
{
|
{
|
||||||
struct tcf_block_ext_info ei = {0, };
|
struct tcf_block_ext_info ei = {0, };
|
||||||
|
|
||||||
|
if (!block)
|
||||||
|
return;
|
||||||
tcf_block_put_ext(block, block->q, &ei);
|
tcf_block_put_ext(block, block->q, &ei);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user