aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2013-05-02 11:36:14 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-05-05 19:25:36 -0400
commitc2fd22df89365df9451d5b91da3b7bfd48122ecd (patch)
tree2676c8f281258275506b9a6e079d6aca38a23537 /arch/powerpc/mm
parentc4463b3738181f46cf0e4675841d039f3662caf9 (diff)
powerpc/tm: Fix null pointer deference in flush_hash_page
Make sure that current->thread.reg exists before we deference it in flush_hash_page. Signed-off-by: Michael Neuling <mikey@neuling.org> Reported-by: John J Miller <millerjo@us.ibm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hash_utils_64.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 3e4c4ed19335..88ac0eeaadde 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1230,6 +1230,7 @@ void flush_hash_page(unsigned long vpn, real_pte_t pte, int psize, int ssize,
1230 * unmapping it first, it may see the speculated version. 1230 * unmapping it first, it may see the speculated version.
1231 */ 1231 */
1232 if (local && cpu_has_feature(CPU_FTR_TM) && 1232 if (local && cpu_has_feature(CPU_FTR_TM) &&
1233 current->thread.regs &&
1233 MSR_TM_ACTIVE(current->thread.regs->msr)) { 1234 MSR_TM_ACTIVE(current->thread.regs->msr)) {
1234 tm_enable(); 1235 tm_enable();
1235 tm_abort(TM_CAUSE_TLBI); 1236 tm_abort(TM_CAUSE_TLBI);