Re: NULL pointer dereference while setting sched_rt_period_us
From: Peter Zijlstra
Date: Wed Jun 18 2008 - 03:48:39 EST
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@xxxxxxxx>
> Signed-off-by: Michael Trimarchi <trimarchimichael@xxxxxxxx>
> ---
> 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) {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/