]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Jul 2008 02:12:53 +0000 (19:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Jul 2008 02:12:53 +0000 (19:12 -0700)
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: fix divide error when trying to configure rt_period to zero

kernel/sched.c

index a66e85639de2e541dd9726245cd344d3ea2d9f3b..94ead43eda62bf8ebb9e054d9cad2a5838fe8f90 100644 (file)
@@ -8502,6 +8502,9 @@ int sched_group_set_rt_period(struct task_group *tg, long rt_period_us)
        rt_period = (u64)rt_period_us * NSEC_PER_USEC;
        rt_runtime = tg->rt_bandwidth.rt_runtime;
 
+       if (rt_period == 0)
+               return -EINVAL;
+
        return tg_set_bandwidth(tg, rt_period, rt_runtime);
 }