diff options
author | Linus Torvalds | 2008-09-20 01:17:12 +0200 |
---|---|---|
committer | Linus Torvalds | 2008-09-20 01:17:12 +0200 |
commit | b4df9d88a62c6db4cee0d96507a27527bf205dde (patch) | |
tree | ebd97fe13e070bff1f5b24d3de8b26ad3b7cf056 /kernel/sched.c | |
parent | Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
parent | sched: fix deadlock in setting scheduler parameter to zero (diff) | |
download | kernel-qcow2-linux-b4df9d88a62c6db4cee0d96507a27527bf205dde.tar.gz kernel-qcow2-linux-b4df9d88a62c6db4cee0d96507a27527bf205dde.tar.xz kernel-qcow2-linux-b4df9d88a62c6db4cee0d96507a27527bf205dde.zip |
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: fix deadlock in setting scheduler parameter to zero
sched: fix 2.6.27-rc5 couldn't boot on tulsa machine randomly
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index cc1f81b50b82..98890807375b 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -8909,6 +8909,9 @@ static int sched_rt_global_constraints(void) u64 rt_runtime, rt_period; int ret = 0; + if (sysctl_sched_rt_period <= 0) + return -EINVAL; + rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period); rt_runtime = tg->rt_bandwidth.rt_runtime; @@ -8925,6 +8928,9 @@ static int sched_rt_global_constraints(void) unsigned long flags; int i; + if (sysctl_sched_rt_period <= 0) + return -EINVAL; + spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags); for_each_possible_cpu(i) { struct rt_rq *rt_rq = &cpu_rq(i)->rt; |