Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 101ef8ff authored by gaurav jindal's avatar gaurav jindal Committed by Todd Poynor
Browse files

drivers: cpufreq: checks to avoid kernel crash in cpufreq_interactive



In cpufreq_governor_interactive, driver throws warning with WARN_ON
for !tunables and event != CPUFREQ_GOV_POLICY_INIT.
In case when tunables is NULL for event other than
CPUFREQ_GOV_POLICY_INIT, kernel will crash as there is no safe check
available before accessing tunables. So to handle such case and avoid
the kernel crash, return -EINVAL if WARN_ON returns TRUE.

Change-Id: I7a3a22d58e3c8a315a1cc1d31143649dc8807dee
Signed-off-by: default avatargaurav jindal <gauravjindal1104@gmail.com>
parent 1e07bd20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment