cpufreq: interactive: fix bug: do not set pcpu->policy to NULL

Speedchange_task will access pcpu->policy randomly, and the policy
will never be free, so just keep pcpu->policy will be ok even the
governor is stopped.

Fixes: a4524d29de ("cpufreq: interactive: fix race between input event and governor exit")
Change-Id: Icac24a866c6f1aa57fe147396729b02c80798f2e
Signed-off-by: Liang Chen <cl@rock-chips.com>
This commit is contained in:
Liang Chen
2019-12-26 15:52:34 +08:00
parent 268a2edd22
commit e8d786bfa7

View File

@@ -1437,7 +1437,6 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
pcpu = &per_cpu(cpuinfo, j);
down_write(&pcpu->enable_sem);
pcpu->governor_enabled = 0;
pcpu->policy = NULL;
del_timer_sync(&pcpu->cpu_timer);
del_timer_sync(&pcpu->cpu_slack_timer);
up_write(&pcpu->enable_sem);