lkml.org 
[lkml]   [2012]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ACPI, APEI, fix ERST table size checking
Date
From: Colin Ian King <colin.king@canonical.com>

Check ERST size against acpi_table_erst rather than
acpi_table_einj. The original code just so happened to work
because the ERST and EINJ headers are the same size.

I'm re-sending this patch as it didn't seem to get picked up when I first
sent it to the list back in September 2011.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: stable@kernel.org
---
drivers/acpi/apei/erst.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index eb9fab5..e4d9d24 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab)
{
if ((erst_tab->header_length !=
(sizeof(struct acpi_table_erst) - sizeof(erst_tab->header)))
- && (erst_tab->header_length != sizeof(struct acpi_table_einj)))
+ && (erst_tab->header_length != sizeof(struct acpi_table_erst)))
return -EINVAL;
if (erst_tab->header.length < sizeof(struct acpi_table_erst))
return -EINVAL;
--
1.7.0.4


\
 
 \ /
  Last update: 2012-03-23 09:51    [W:0.028 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site