From 7edde8fd90a1d4a4258ed1246303c4fabb3dc320 Mon Sep 17 00:00:00 2001 From: Danny Wood Date: Mon, 8 Apr 2019 09:59:40 +0100 Subject: [PATCH] cpufreq: interactive: check speedchange_task pointer before waking it to avoid a kernel panic --- drivers/cpufreq/cpufreq_interactive.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 1dba312c0da..d1907623a30 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -477,7 +477,9 @@ static void cpufreq_interactive_timer(unsigned long data) spin_lock_irqsave(&speedchange_cpumask_lock, flags); cpumask_set_cpu(data, &speedchange_cpumask); spin_unlock_irqrestore(&speedchange_cpumask_lock, flags); - wake_up_process_no_notif(tunables->speedchange_task); + + if (tunables->speedchange_task) + wake_up_process_no_notif(tunables->speedchange_task); rearm: if (!timer_pending(&pcpu->cpu_timer)) -- 2.20.1