* Michael Ellerman wrote:
> On Wed, 2016-04-13 at 09:43 +0200, Ingo Molnar wrote:
> > * Srikar Dronamraju wrote:
> >
> > > * Anton Blanchard [2016-04-06 21:59:50]:
> > >
> > > > Looks good, and the patch below does fix the oops for me.
> > > >
> > > > Anton
> > > > --
> > > >
> > > > task_
On Wed, 2016-04-13 at 09:43 +0200, Ingo Molnar wrote:
> * Srikar Dronamraju wrote:
>
> > * Anton Blanchard [2016-04-06 21:59:50]:
> >
> > > Looks good, and the patch below does fix the oops for me.
> > >
> > > Anton
> > > --
> > >
> > > task_pt_regs() can return NULL for kernel threads, so ad
* Srikar Dronamraju wrote:
> * Anton Blanchard [2016-04-06 21:59:50]:
>
> > Looks good, and the patch below does fix the oops for me.
> >
> > Anton
> > --
> >
> > task_pt_regs() can return NULL for kernel threads, so add a check.
> > This fixes an oops at boot on ppc64.
> >
> > Signed-off-b
Hi Peter/Ingo,
On Wed, 2016-04-06 at 21:59 +1000, Anton Blanchard wrote:
> Hi Peter,
>
> > Ah, so sometihng like:
> >
> > struct pt_regs *regs = task_pt_regs();
> > int index = CPUACCT_USAGE_SYSTEM;
> >
> > if (regs && user_mode(regs))
> > index = CPUACCT_USAGE_USER;
> >
.org; t...@kernel.org; torva...@linux-foundation.org;
> zhao...@cn.fujitsu.com; yangds.f...@cn.fujitsu.com; h...@zytor.com; Stephen
> Rothwell ; Michael Ellerman ;
> linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()
>
>
* Anton Blanchard [2016-04-06 21:59:50]:
> Looks good, and the patch below does fix the oops for me.
>
> Anton
> --
>
> task_pt_regs() can return NULL for kernel threads, so add a check.
> This fixes an oops at boot on ppc64.
>
> Signed-off-by: Anton Blanchard
Works for me too.
Reported-and