lkml.org 
[lkml]   [2008]   [Jul]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 1 Jul 2008 08:26:04 +0200
FromIngo Molnar <>
SubjectRe: divide error trying to set rt_period to zero
* Raistlin <raistlin@linux.it> wrote:

> Ops! :-O
> 
> My fault, moving the 'if' back and forth from one function to another 
> I finally sent the wrong (and broken!) version of the patch... Very 
> sorry about it!
> 
> I know, I would have noticed just looking at the code... But I missed 
> it. :-(

hey, no problem.

> Anyway, if still interested in, the following one build and work... 
> I've just tried it and I'm quite sure this time. :-P

applied to tip/sched/urgent - thanks Dario. We are interested in it of 
course, you fixed a real bug in the scheduler :-)

small sidenote:

> +++ b/kernel/sched.c
> @@ -8501,6 +8501,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);
>  }

that patch was whitespace damaged (lines wrapped and tabs converted to 
spaces). I fixed it up by hand - you can avoid such problems with future 
patches by sending patches a'la Documentation/email-clients.txt.

	Ingo


\
 
 \ /
  Last update: 2008-07-01 08:29    [from the cache]
©2003-2008