mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
cpuset: limit the input of cpuset.sched_relax_domain_level
We allow the inputs to be [-1 ... SD_LV_MAX), and return -EINVAL for inputs outside this range. Signed-off-by: Li Zefan <[email protected]> Acked-by: Paul Menage <[email protected]> Acked-by: Paul Jackson <[email protected]> Acked-by: Hidetoshi Seto <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
9bedbcb207
commit
30e0e17819
3 changed files with 9 additions and 4 deletions
|
|
@ -1037,8 +1037,8 @@ int current_cpuset_is_being_rebound(void)
|
|||
|
||||
static int update_relax_domain_level(struct cpuset *cs, s64 val)
|
||||
{
|
||||
if ((int)val < 0)
|
||||
val = -1;
|
||||
if (val < -1 || val >= SD_LV_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
if (val != cs->relax_domain_level) {
|
||||
cs->relax_domain_level = val;
|
||||
|
|
|
|||
Loading…
Reference in a new issue