Re: [bug, acpi] BUG: spinlock bad magic on CPU#0, swapper/1, ACPI Exception (utmutex-0263): AE_BAD_PARAMETER

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Hi,

On Fri, Jun 20, 2008 at 11:52 AM, Ingo Molnar <mingo@elte.hu> wrote:

...


It seems that some acpi calls are made before acpi is even
initialized, hence the AE_BAD_PARAMETER (ACPI is trying to use
uninitialized mutexes) -- I think that may be the source of the mutex
corruption as well.

This probably happens because acpi_early_init() (which happens before
all the initcalls; mutex initialization too) returns early:

void __init acpi_early_init(void)
{
        acpi_status status = AE_OK;

        if (acpi_disabled)
                return;
...

I notice that you're booting with acpi=off, so it might be the same
problem. You could try this patch to find other callers that don't
check whether ACPI is available before using ACPI-defined mutexes:

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 235a138..5b34328 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -818,8 +818,7 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 u
        long jiffies;
        int ret = 0;

-       if (!sem || (units < 1))
-               return AE_BAD_PARAMETER;
+       BUG_ON(!sem || (units < 1));

        if (units > 1)
                return AE_SUPPORT;

(This will dump the stack instead of printing AE_BAD_PARAMETER in your
dmesg, so this is guaranteed to halt your machine given that you have
at least three of these messages in your log already!)


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [bug, acpi] BUG: spinlock bad magic on CPU#0, swapper/ ..., Vegard Nossum, (Fri Jun 20, 6:11 am)
[PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Fri Jun 20, 6:56 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Fri Jun 20, 1:40 pm)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Fri Jun 20, 2:27 pm)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Sat Jun 21, 1:19 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Tue Jun 24, 4:52 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Bjorn Helgaas, (Tue Jun 24, 8:22 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Bjorn Helgaas, (Wed Jun 25, 8:08 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Bjorn Helgaas, (Thu Jun 26, 9:44 am)