]> git.baikalelectronics.ru Git - kernel.git/commit
sch_hfsc: fix null pointer deref and double free on init failure
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Wed, 30 Aug 2017 09:49:00 +0000 (12:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Aug 2017 22:26:11 +0000 (15:26 -0700)
commitb9263f3b34dae3588fccdf85524b6296ca78d847
treeb6de819af8c1171bfbd06a17d65290539ba5218c
parent1a8c023756acffb1495869936a0fa35de865e146
sch_hfsc: fix null pointer deref and double free on init failure

Depending on where ->init fails we can get a null pointer deref due to
uninitialized hires timer (watchdog) or a double free of the qdisc hash
because it is already freed by ->destroy().

Fixes: 0c5301009a03 ("net/sched/hfsc: allocate tcf block for hfsc root class")
Fixes: 2a1eb255db0f ("net_sched: fix error recovery at qdisc creation")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_hfsc.c