LKML Archive mirror
 help / color / mirror / Atom feed
* [Patch-next] Oops caused by ERST Table not supported.
@ 2010-05-10  8:04 Jin Dongming
  2010-05-10  8:11 ` Huang Ying
  0 siblings, 1 reply; 2+ messages in thread
From: Jin Dongming @ 2010-05-10  8:04 UTC (permalink / raw
  To: LKLM; +Cc: lenb, Andi Kleen, Huang Ying, Hidetoshi Seto, ACPI

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


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

* Re: [Patch-next] Oops caused by ERST Table not supported.
  2010-05-10  8:04 [Patch-next] Oops caused by ERST Table not supported Jin Dongming
@ 2010-05-10  8:11 ` Huang Ying
  0 siblings, 0 replies; 2+ messages in thread
From: Huang Ying @ 2010-05-10  8:11 UTC (permalink / raw
  To: Jin Dongming; +Cc: LKLM, lenb, Andi Kleen, Hidetoshi Seto, ACPI

Hi, Dongming,

On Mon, 2010-05-10 at 16:04 +0800, Jin Dongming wrote:
> 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) {

Thank you very much for your fixing.

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

Best Regards,
Huang Ying



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

end of thread, other threads:[~2010-05-10  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10  8:04 [Patch-next] Oops caused by ERST Table not supported Jin Dongming
2010-05-10  8:11 ` 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 read-only IMAP folder(s) and NNTP newsgroup(s).