cpufreq: interactive: check speedchange_task pointer before waking it to avoid a...
authorDanny Wood <danwood76@gmail.com>
Mon, 8 Apr 2019 08:59:40 +0000 (09:59 +0100)
committerDanny Wood <danwood76@gmail.com>
Mon, 8 Apr 2019 09:21:59 +0000 (10:21 +0100)
drivers/cpufreq/cpufreq_interactive.c

index 1dba312c0da27432dfd4cd22d8755a96d986de57..d1907623a3045c28018be4ec9f7ca6b61934b173 100644 (file)
@@ -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))