[PATCH v2] powerpc/fsl_pci: Check for get_user/probe_kernel_address failure

Scott Wood scottwood at freescale.com
Tue Aug 25 02:43:03 AEST 2015


Signed-off-by: Scott Wood <scottwood at freescale.com>
Reported-by: Andrew Morton <akpm at linux-foundation.org>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Hongtao Jia <hongtao.jia at freescale.com>
---
v2: s/ret/!ret/

 arch/powerpc/sysdev/fsl_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index ebc1f412..c42609d 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -1002,7 +1002,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
 			ret = probe_kernel_address(regs->nip, inst);
 		}
 
-		if (mcheck_handle_load(regs, inst)) {
+		if (!ret && mcheck_handle_load(regs, inst)) {
 			regs->nip += 4;
 			return 1;
 		}
-- 
2.1.4



More information about the Linuxppc-dev mailing list