From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Neuling , John J Miller , Benjamin Herrenschmidt Subject: [ 03/73] powerpc/tm: Fix null pointer deference in flush_hash_page Date: Thu, 9 May 2013 15:24:53 -0700 Message-Id: <20130509222526.830697843@linuxfoundation.org> In-Reply-To: <20130509222526.480204972@linuxfoundation.org> References: <20130509222526.480204972@linuxfoundation.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Neuling commit c2fd22df89365df9451d5b91da3b7bfd48122ecd upstream. Make sure that current->thread.reg exists before we deference it in flush_hash_page. Signed-off-by: Michael Neuling Reported-by: John J Miller Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/mm/hash_utils_64.c | 1 + 1 file changed, 1 insertion(+) --- 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, * 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);