ACPI, APEI, CPER: Fix status check during error printing
authorChen, Gong <gong.chen@linux.intel.com>
Fri, 18 Oct 2013 21:27:51 +0000 (14:27 -0700)
committerTony Luck <tony.luck@intel.com>
Mon, 21 Oct 2013 22:12:00 +0000 (15:12 -0700)
Commit aaf9d93be71c:
ACPI / APEI: fix error status check condition for CPER
only catches condition check before print, but a similar check is
needed during printing CPER error sections.

Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
drivers/acpi/apei/cper.c

index 33dc6a0..f827f02 100644 (file)
@@ -353,7 +353,7 @@ void apei_estatus_print(const char *pfx,
               cper_severity_str(severity));
        data_len = estatus->data_length;
        gdata = (struct acpi_hest_generic_data *)(estatus + 1);
-       while (data_len > sizeof(*gdata)) {
+       while (data_len >= sizeof(*gdata)) {
                gedata_len = gdata->error_data_length;
                apei_estatus_print_section(pfx, gdata, sec_no);
                data_len -= gedata_len + sizeof(*gdata);