From: Nikolay Aleksandrov Date: Wed, 30 Aug 2017 09:49:00 +0000 (+0300) Subject: sch_hfsc: fix null pointer deref and double free on init failure X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c80cb643423d8ea1748f57c51480742f554830ec;p=pandora-kernel.git sch_hfsc: fix null pointer deref and double free on init failure commit 3bdac362a2f89ed3e148fa6f38c5f5d858f50b1a upstream. 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: 8d5537387505 ("net/sched/hfsc: allocate tcf block for hfsc root class") Fixes: 87b60cfacf9f ("net_sched: fix error recovery at qdisc creation") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller [bwh: Backported to 3.2: sch_hfsc doesn't use a tcf block] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed