提交 c2fd22df 编写于 作者: M Michael Neuling 提交者: Benjamin Herrenschmidt

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: NMichael Neuling <mikey@neuling.org>
Reported-by: NJohn J Miller <millerjo@us.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 c4463b37
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册