powerpc/kernel: Avoid memory corruption at early stage
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Thu, 8 Jan 2015 05:40:51 +0000 (16:40 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 23 Jan 2015 03:02:52 +0000 (14:02 +1100)
When calling to early_setup(), we pick "boot_paca" up for the master CPU
and initialize that with initialise_paca(). At that point, the SLB
shadow buffer isn't populated yet. Updating the SLB shadow buffer should
corrupt what we had in physical address 0 where the trap instruction is
usually stored.

This hasn't been observed to cause any trouble in practice, but is
obviously fishy.

Fixes: 6f4441ef7009 ("powerpc: Dynamically allocate slb_shadow from memblock")
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/paca.c

Simple merge