[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <37d2a3622d249d83413c92a1cd9e94b5237d0fcc.1333101989.git.len.brown@intel.com>
Date: Fri, 30 Mar 2012 06:14:14 -0400
From: Len Brown <lenb@...nel.org>
To: linux-acpi@...r.kernel.org, linux-pm@...ts.linux-foundation.org
Cc: linux-kernel@...r.kernel.org, Jiang Liu <liuj97@...il.com>,
Jiang Liu <jiang.liu@...wei.com>,
Len Brown <len.brown@...el.com>
Subject: [PATCH 71/76] CPER failed to handle generic error records with
multiple sections
From: Jiang Liu <liuj97@...il.com>
The function apei_estatus_print() and apei_estatus_check() forget to move ahead
the gdata pointer when dealing with multiple generic error data sections.
Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
Signed-off-by: Len Brown <len.brown@...el.com>
---
drivers/acpi/apei/cper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c
index 5d41894..e6defd8 100644
--- a/drivers/acpi/apei/cper.c
+++ b/drivers/acpi/apei/cper.c
@@ -362,6 +362,7 @@ void apei_estatus_print(const char *pfx,
gedata_len = gdata->error_data_length;
apei_estatus_print_section(pfx, gdata, sec_no);
data_len -= gedata_len + sizeof(*gdata);
+ gdata = (void *)(gdata + 1) + gedata_len;
sec_no++;
}
}
@@ -396,6 +397,7 @@ int apei_estatus_check(const struct acpi_hest_generic_status *estatus)
if (gedata_len > data_len - sizeof(*gdata))
return -EINVAL;
data_len -= gedata_len + sizeof(*gdata);
+ gdata = (void *)(gdata + 1) + gedata_len;
}
if (data_len)
return -EINVAL;
--
1.7.10.rc2.19.gfae9d
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists