[PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

Michael Ellerman mpe at ellerman.id.au
Wed Apr 1 13:40:38 AEDT 2015


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 outside of paca array and may later lead to various panics.
> 
> Fixes: 7cba160ad789 (powernv/cpuidle: Redesign idle states management)
> Signed-off-by: Jan Stancek <jstancek at redhat.com>

Thanks. I'll send that to Linus in the next day or two and mark it for stable
as well.

cheers




More information about the Linuxppc-dev mailing list