mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user