Re: [PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-04-01 Thread Preeti U Murthy
On 03/31/2015 09:41 PM, Jan Stancek wrote: > Space allocated for paca is based off nr_cpu_ids, > but pnv_alloc_idle_core_states() iterates paca with > cpu_nr_cores()*threads_per_core, which is using NR_CPUS. > > This causes pnv_alloc_idle_core_states() to write over memory, > which is outside of

Re: [PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-04-01 Thread Preeti U Murthy
On 03/31/2015 09:41 PM, Jan Stancek wrote: Space allocated for paca is based off nr_cpu_ids, but pnv_alloc_idle_core_states() iterates paca with cpu_nr_cores()*threads_per_core, which is using NR_CPUS. This causes pnv_alloc_idle_core_states() to write over memory, which is outside of paca

Re: [PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-03-31 Thread Michael Ellerman
On Tue, 2015-03-31 at 18:11 +0200, Jan Stancek wrote: > Space allocated for paca is based off nr_cpu_ids, > but pnv_alloc_idle_core_states() iterates paca with > cpu_nr_cores()*threads_per_core, which is using NR_CPUS. > > This causes pnv_alloc_idle_core_states() to write over memory, > which is

[PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-03-31 Thread Jan Stancek
Space allocated for paca is based off nr_cpu_ids, but pnv_alloc_idle_core_states() iterates paca with cpu_nr_cores()*threads_per_core, which is using NR_CPUS. This causes pnv_alloc_idle_core_states() to write over memory, which is outside of paca array and may later lead to various panics.

Re: [PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-03-31 Thread Michael Ellerman
On Tue, 2015-03-31 at 18:11 +0200, Jan Stancek wrote: Space allocated for paca is based off nr_cpu_ids, but pnv_alloc_idle_core_states() iterates paca with cpu_nr_cores()*threads_per_core, which is using NR_CPUS. This causes pnv_alloc_idle_core_states() to write over memory, which is

[PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-03-31 Thread Jan Stancek
Space allocated for paca is based off nr_cpu_ids, but pnv_alloc_idle_core_states() iterates paca with cpu_nr_cores()*threads_per_core, which is using NR_CPUS. This causes pnv_alloc_idle_core_states() to write over memory, which is outside of paca array and may later lead to various panics.