public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: LKLM <linux-kernel@vger.kernel.org>
Cc: lenb <lenb@kernel.org>, Andi Kleen <ak@linux.intel.com>,
	Huang Ying <ying.huang@intel.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	ACPI <linux-acpi@vger.kernel.org>
Subject: [Patch-next] Oops caused by ERST Table not supported.
Date: Mon, 10 May 2010 17:04:32 +0900	[thread overview]
Message-ID: <4BE7BE10.8080000@np.css.fujitsu.com> (raw)

On my server(x86_64) when the mcelog is executed, it will cause oops. And
following information could be gotten.

Call Trace:
  [<ffffffff812ceefd>] ? avc_has_perm_noaudit+0x4d/0x680
  [<ffffffff812ceefd>] ? avc_has_perm_noaudit+0x4d/0x680
  [<ffffffff8142492b>] erst_read_next+0x3b/0x100
  [<ffffffff81028def>] apei_read_mce+0x2f/0x170
  [<ffffffff811bfc5d>] ? check_object+0x36d/0x430
  [<ffffffff811c059c>] ? init_object+0x9c/0xe0
  [<ffffffff811c38ef>] ? __slab_alloc+0x7cf/0x8b0
  [<ffffffff81025cba>] ? mce_read+0x4a/0x510
  [<ffffffff811c49ab>] ? __kmalloc+0x2db/0x390
  [<ffffffff81025cba>] ? mce_read+0x4a/0x510
  [<ffffffff811bf81d>] ? check_bytes_and_report+0x3d/0x110
  [<ffffffff816caf1e>] ? _cond_resched+0x3e/0x80
  [<ffffffff8102613b>] mce_read+0x4cb/0x510
  [<ffffffff812cb9f2>] ? security_file_permission+0x122/0x130
  [<ffffffff811dff16>] ? rw_verify_area+0x196/0x210
  [<ffffffff811e0e7b>] vfs_read+0x1bb/0x2f0
  [<ffffffff811e172d>] sys_read+0x8d/0xe0
  [<ffffffff81003c9b>] system_call_fastpath+0x16/0x1b

This is because of the ERST Table not supported on my server and it
makes the variable "ctx" used by erst_read_nextis NULL. So I make
the patch to solve this problem.

And I confirmed it on my server(x86_64).

Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
---
 drivers/acpi/apei/erst.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 5fe5c0f..2ebc391 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -698,6 +698,9 @@ ssize_t erst_read_next(struct cper_record_header *record, size_t buflen)
 	unsigned long flags;
 	u64 record_id;
 
+	if (erst_disable)
+		return -ENODEV;
+
 	spin_lock_irqsave(&erst_lock, flags);
 	rc = __erst_get_next_record_id(&record_id);
 	if (rc) {
-- 
1.7.0.3


             reply	other threads:[~2010-05-10  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10  8:04 Jin Dongming [this message]
2010-05-10  8:11 ` [Patch-next] Oops caused by ERST Table not supported Huang Ying

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=4BE7BE10.8080000@np.css.fujitsu.com \
    --to=jin.dongming@np.css.fujitsu.com \
    --cc=ak@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seto.hidetoshi@jp.fujitsu.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