From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752355AbYFRHsi (ORCPT ); Wed, 18 Jun 2008 03:48:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750856AbYFRHs3 (ORCPT ); Wed, 18 Jun 2008 03:48:29 -0400 Received: from casper.infradead.org ([85.118.1.10]:58090 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbYFRHs2 (ORCPT ); Wed, 18 Jun 2008 03:48:28 -0400 Subject: Re: NULL pointer dereference while setting sched_rt_period_us From: Peter Zijlstra To: Dario Faggioli Cc: Michael Trimarchi , mingo@elte.hu, Linux Kernel Mailing List In-Reply-To: <1213773519.5371.8.camel@Palanthas.Krynn> References: <1213773519.5371.8.camel@Palanthas.Krynn> Content-Type: text/plain Date: Wed, 18 Jun 2008 09:48:31 +0200 Message-Id: <1213775311.16944.199.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Michael Trimarchi > --- > 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) { >