* 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
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 add a check.
This fixes an oops at boot on ppc64.
Fixes: d740037fac70 ("sched/cpuacct: Split usage accounting into user_usage and
sys_usage")
Signed-off-by: Anton Blanchard
Reported-and-Tested-by: Srikar Dronamraju
* 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
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;
>
t;;
> linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()
>
> * Anton Blanchard <an...@samba.org> [2016-04-06 21:59:50]:
>
> > Looks good, and the patch below does fix the oops for me.
> >
> > Anton
> >
* 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
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;
>
> should work, right?
Looks good, and the patch below does fix the oops for me.