Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-13 Thread Ingo Molnar
* 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_

Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-13 Thread Michael Ellerman
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

Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-13 Thread Ingo Molnar
* 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

Ping? Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-10 Thread Michael Ellerman
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; > >

RE: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-06 Thread Zhao Lei
.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() > >

Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-06 Thread Srikar Dronamraju
* 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