aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2013-05-02 15:36:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-11 07:18:16 -0700
commit4a32fbd0b67057a94dbd173ed85114aa46e32dfb (patch)
treee00b4e99941b3d631b1e5b2e2de15db8f9cc5639 /arch
parent5e701b123c0d3c58c01d3168de9ef11d86eea34d (diff)
downloadvexpress-lsk-4a32fbd0b67057a94dbd173ed85114aa46e32dfb.tar.gz
powerpc/tm: Fix null pointer deference in flush_hash_page
commit c2fd22df89365df9451d5b91da3b7bfd48122ecd upstream. 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> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-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 f410c3e12c1..b75c52ff42c 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1191,6 +1191,7 @@ void flush_hash_page(unsigned long vpn, real_pte_t pte, int psize, int ssize,
* unmapping it first, it may see the speculated version.
*/
if (local && cpu_has_feature(CPU_FTR_TM) &&
+ current->thread.regs &&
MSR_TM_ACTIVE(current->thread.regs->msr)) {
tm_enable();
tm_abort(TM_CAUSE_TLBI);