cpufreq: apply init protection for governor
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
This commit is contained in:
parent
41b2ee9adb
commit
9c13012c2d
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <linux/tick.h>
|
||||
#include <trace/events/power.h>
|
||||
#include <trace/hooks/cpufreq.h>
|
||||
#include <linux/binfmts.h>
|
||||
|
||||
static LIST_HEAD(cpufreq_policy_list);
|
||||
|
||||
|
@ -790,6 +791,9 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
|
|||
char str_governor[16];
|
||||
int ret;
|
||||
|
||||
if (task_is_booster(current))
|
||||
return -EINVAL;
|
||||
|
||||
ret = sscanf(buf, "%15s", str_governor);
|
||||
if (ret != 1)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Reference in a new issue