sched/debug: Limit sd->*_idx range on sysctl
authorNamhyung Kim <namhyung.kim@lge.com>
Thu, 16 Aug 2012 08:03:24 +0000 (17:03 +0900)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Sep 2012 12:31:32 +0000 (14:31 +0200)
Various sd->*_idx's are used for refering the rq's load average table
when selecting a cpu to run.  However they can be set to any number
with sysctl knobs so that it can crash the kernel if something bad is
given. Fix it by limiting them into the actual range.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1345104204-8317-1-git-send-email-namhyung@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c

Simple merge