mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-01 00:00:50 +02:00
In the function cpufreq_governor_dbs, the case CPUFREQ_GOV_STOP is not completely atomic. The removal of sysfs is outside the critical path. If a START/STOP done frequently from user space then there is chance of adding the sysfs interface before removal. This creates a warning from sysfs saying creating an already existing entry. Also once it fails to create, cpufreq_governor_dbs returns with error code. The dbs_enable value is incremented which is not rolled back and cpufreq core tries to set the old governor. This might create further problems. Hence the removal of sysfs entry should happen in the critical path. CRs-fixed: 440969 Change-Id: I98891756caf2ce0b85e39e9b4f58034af1ed97ce Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>