From: Chen Gong <gong.chen@linux.intel.com>
To: tony.luck@intel.com, ying.huang@intel.com, lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, Chen Gong <gong.chen@linux.intel.com>
Subject: [PATCH] ACPI, APEI: Add validation check before GHES error is recorded
Date: Thu, 29 Mar 2012 15:09:12 +0800 [thread overview]
Message-ID: <1333004952-12403-1-git-send-email-gong.chen@linux.intel.com> (raw)
When GHES error record is logged into mcelog kernel buffer,
a validation check for physical address is necessary, which prevents
invalid physical address is happened in error record.
Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
---
arch/x86/kernel/cpu/mcheck/mce-apei.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c
index 507ea58..514b77f 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-apei.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c
@@ -49,7 +49,8 @@ void apei_mce_report_mem_error(int corrected, struct cper_sec_mem_err *mem_err)
m.bank = 1;
/* Fake a memory read corrected error with unknown channel */
m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f;
- m.addr = mem_err->physical_addr;
+ if (mem_err->validation_bits & CPER_MEM_VALID_PHYSICAL_ADDRESS)
+ m.addr = mem_err->physical_addr;
mce_log(&m);
mce_notify_irq();
}
--
1.7.10.rc2.27.g59012
next reply other threads:[~2012-03-29 7:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 7:09 Chen Gong [this message]
2012-03-29 17:07 ` [PATCH] ACPI, APEI: Add validation check before GHES error is recorded Luck, Tony
2012-03-31 1:53 ` Chen Gong
2012-03-31 3:24 ` Huang Ying
2012-03-31 5:45 ` Chen Gong
2012-03-31 5:54 ` [PATCH V2] " Chen Gong
2012-04-02 15:47 ` Luck, Tony
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=1333004952-12403-1-git-send-email-gong.chen@linux.intel.com \
--to=gong.chen@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=ying.huang@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