powerpc/fsl_pci: Check for get_user/probe_kernel_address failure
authorScott Wood <scottwood@freescale.com>
Mon, 24 Aug 2015 16:43:03 +0000 (11:43 -0500)
committerScott Wood <scottwood@freescale.com>
Sat, 17 Oct 2015 05:35:41 +0000 (00:35 -0500)
Signed-off-by: Scott Wood <scottwood@freescale.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hongtao Jia <hongtao.jia@freescale.com>
arch/powerpc/sysdev/fsl_pci.c

index ebc1f412cf4921e2a5dff793e9787dd9dff176e7..c42609dde8d2ea564cb4786fc105b50c4c394f8c 100644 (file)
@@ -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;
                }