linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] CPER failed to handle generic error records with multiple sections
@ 2012-02-14 16:01 Jiang Liu
  2012-02-14 16:01 ` [PATCH v3 2/2] Fix a copy & paste error in erst.c Jiang Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Jiang Liu @ 2012-02-14 16:01 UTC (permalink / raw)
  To: Len Brown, Huang Ying, Tony Luck, Chen Gong; +Cc: Jiang Liu, linux-acpi

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@huawei.com>
---
 drivers/acpi/apei/cper.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v3 2/2] Fix a copy & paste error in erst.c.
  2012-02-14 16:01 [PATCH v3 1/2] CPER failed to handle generic error records with multiple sections Jiang Liu
@ 2012-02-14 16:01 ` Jiang Liu
  2012-02-17  5:28   ` Huang Ying
  0 siblings, 1 reply; 3+ messages in thread
From: Jiang Liu @ 2012-02-14 16:01 UTC (permalink / raw)
  To: Len Brown, Huang Ying, Tony Luck, Chen Gong; +Cc: Jiang Liu, linux-acpi

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
 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.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 2/2] Fix a copy & paste error in erst.c.
  2012-02-14 16:01 ` [PATCH v3 2/2] Fix a copy & paste error in erst.c Jiang Liu
@ 2012-02-17  5:28   ` Huang Ying
  0 siblings, 0 replies; 3+ messages in thread
From: Huang Ying @ 2012-02-17  5:28 UTC (permalink / raw)
  To: Jiang Liu; +Cc: Len Brown, Tony Luck, Chen Gong, Jiang Liu, linux-acpi

On Wed, 2012-02-15 at 00:01 +0800, Jiang Liu wrote:
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>

Acked-by: Huang Ying <ying.huang@intel.com>

> ---
>  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;



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-17  5:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 16:01 [PATCH v3 1/2] CPER failed to handle generic error records with multiple sections Jiang Liu
2012-02-14 16:01 ` [PATCH v3 2/2] Fix a copy & paste error in erst.c Jiang Liu
2012-02-17  5:28   ` Huang Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).