From: Huang Ying <ying.huang@intel.com>
To: Chen Gong <gong.chen@linux.intel.com>
Cc: tony.luck@intel.com, linux-acpi@vger.kernel.org, rjw@sisk.pl
Subject: Re: [PATCH] ACPI/APEI: fix error status check condition for CPER
Date: Wed, 20 Mar 2013 09:36:56 +0800 [thread overview]
Message-ID: <1363743416.11204.14.camel@yhuang-dev> (raw)
In-Reply-To: <1363675687-7839-1-git-send-email-gong.chen@linux.intel.com>
On Tue, 2013-03-19 at 02:48 -0400, Chen Gong wrote:
> In Table 18-289, ACPI5.0 SPEC, the error data length in CPER
> Generic Error Data Entry can be 0, which means this generic
> error data entry can have only one header. So fix the check
> conditon for it.
>
> Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
Good catch!
Reviewed-by: Huang Ying <ying.huang@intel.com>
> ---
> drivers/acpi/apei/cper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c
> index 1e5d8a4..fefc2ca 100644
> --- a/drivers/acpi/apei/cper.c
> +++ b/drivers/acpi/apei/cper.c
> @@ -405,7 +405,7 @@ int apei_estatus_check(const struct acpi_hest_generic_status *estatus)
> return rc;
> 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;
> if (gedata_len > data_len - sizeof(*gdata))
> return -EINVAL;
next prev parent reply other threads:[~2013-03-20 1:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 6:48 [PATCH] ACPI/APEI: fix error status check condition for CPER Chen Gong
2013-03-20 1:36 ` Huang Ying [this message]
2013-03-26 13:35 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363743416.11204.14.camel@yhuang-dev \
--to=ying.huang@intel.com \
--cc=gong.chen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox