Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / drivers / acpi / apei / ghes.c
index 3dd9c46..eac4f3b 100644 (file)
@@ -657,7 +657,7 @@ static int ghes_proc(struct ghes *ghes)
        ghes_do_proc(ghes, ghes->estatus);
 out:
        ghes_clear_estatus(ghes);
-       return 0;
+       return rc;
 }
 
 static void ghes_add_timer(struct ghes *ghes)
@@ -847,6 +847,8 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs)
                if (ghes_read_estatus(ghes, 1)) {
                        ghes_clear_estatus(ghes);
                        continue;
+               } else {
+                       ret = NMI_HANDLED;
                }
 
                sev = ghes_severity(ghes->estatus->error_severity);
@@ -858,12 +860,11 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs)
 
                __process_error(ghes);
                ghes_clear_estatus(ghes);
-
-               ret = NMI_HANDLED;
        }
 
 #ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
-       irq_work_queue(&ghes_proc_irq_work);
+       if (ret == NMI_HANDLED)
+               irq_work_queue(&ghes_proc_irq_work);
 #endif
        atomic_dec(&ghes_in_nmi);
        return ret;