Messages in this thread | | | Subject | Re: NULL pointer dereference while setting sched_rt_period_us | From | Peter Zijlstra <> | Date | Wed, 18 Jun 2008 09:48:31 +0200 |
| |
On Wed, 2008-06-18 at 09:18 +0200, Dario Faggioli wrote: > Hi all,
Thanks! I'll push it fwd with my other rt-group fixes
> We think the following patch solves the issue. > > Hope this is of some help. > > Regards, > Dario Faggioli > > Signed-off-by: Dario Faggioli <raistlin@linux.it> > Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it> > --- > diff --git a/kernel/sched.c b/kernel/sched.c > index eaf6751..7205e25 100644 > --- a/kernel/sched.c > +++ b/kernel/sched.c > @@ -8348,7 +8348,7 @@ static unsigned long to_ratio(u64 period, u64 > runtime) > #ifdef CONFIG_CGROUP_SCHED > static int __rt_schedulable(struct task_group *tg, u64 period, u64 > runtime) > { > - struct task_group *tgi, *parent = tg->parent; > + struct task_group *tgi, *parent = tg ? tg->parent : NULL; > unsigned long total = 0; > > if (!parent) { >
| |