Re: [Patch-next] Oops caused by ERST Table not supported.

From: Huang Ying
Date: Mon May 10 2010 - 04:12:04 EST


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@xxxxxxxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxx>

Best Regards,
Huang Ying


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/