diff options
| author | Ingo Molnar <[email protected]> | 2008-10-03 10:34:36 +0200 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2008-10-03 10:34:36 +0200 |
| commit | b5259d944279d0b7e78a83849a352d8ba0447c4c (patch) | |
| tree | 42f0e7dc404bc776f9a736c17f52c121da166fc1 /kernel/sched.c | |
| parent | 1c50b728c3e734150b8a4a8310ce3e01bc5c70be (diff) | |
| parent | 94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff) | |
Merge commit 'v2.6.27-rc8' into core/rcu
Diffstat (limited to 'kernel/sched.c')
| -rw-r--r-- | kernel/sched.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index cc1f81b50b82..13dd2db9fb2d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1087,7 +1087,7 @@ hotplug_hrtick(struct notifier_block *nfb, unsigned long action, void *hcpu) return NOTIFY_DONE; } -static void init_hrtick(void) +static __init void init_hrtick(void) { hotcpu_notifier(hotplug_hrtick, 0); } @@ -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; |