powerpc/powernv: Fix minor off-by-one error in opal_mce_check_early_recovery()
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Mon, 21 Dec 2015 07:28:37 +0000 (18:28 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 27 Dec 2015 08:12:41 +0000 (19:12 +1100)
Fix off-by-one error in opal_mce_check_early_recovery() when checking
whether the NIP falls within OPAL space.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal.c

index b349dd3e76eacdb3e713ff2f531ca78d34789d6c..81f4a3ab8743d231a142ac9d372a2f96d3a9d699 100644 (file)
@@ -548,7 +548,7 @@ bool opal_mce_check_early_recovery(struct pt_regs *regs)
                goto out;
 
        if ((regs->nip >= opal.base) &&
-                       (regs->nip <= (opal.base + opal.size)))
+                       (regs->nip < (opal.base + opal.size)))
                recover_addr = find_recovery_address(regs->nip);
 
        /*