summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-05-13 04:27:17 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-19 09:45:36 +0200
commit30e0e178193d4221abc9926b07a4c7661c7cc4a9 (patch)
treef6ad7d54e810a97345ad82b55832a2dbfb3ca6e2 /kernel/sched.c
parentagp: brown paper bag patch - put back two lines that got lost (diff)
downloadlinux-30e0e178193d4221abc9926b07a4c7661c7cc4a9.tar.xz
linux-30e0e178193d4221abc9926b07a4c7661c7cc4a9.zip
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 <lizf@cn.fujitsu.com> Acked-by: Paul Menage <menage@google.com> Acked-by: Paul Jackson <pj@sgi.com> Acked-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to '')
-rw-r--r--kernel/sched.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index eaf6751e7612..bb2c699c9f5e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6877,7 +6877,12 @@ static int default_relax_domain_level = -1;
static int __init setup_relax_domain_level(char *str)
{
- default_relax_domain_level = simple_strtoul(str, NULL, 0);
+ unsigned long val;
+
+ val = simple_strtoul(str, NULL, 0);
+ if (val < SD_LV_MAX)
+ default_relax_domain_level = val;
+
return 1;
}
__setup("relax_domain_level=", setup_relax_domain_level);