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

From: Michael Ellerman
Date: Tue Mar 31 2015 - 22:40:46 EST


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@xxxxxxxxxx>

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

cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/