Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2fd22df authored by Michael Neuling's avatar Michael Neuling Committed by Benjamin Herrenschmidt
Browse files

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: default avatarMichael Neuling <mikey@neuling.org>
Reported-by: default avatarJohn J Miller <millerjo@us.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent c4463b37
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1230,6 +1230,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);