linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Another regression in 2.6.30-rc1
@ 2009-04-09 15:37 Larry Finger
  2009-04-10  4:34 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2009-04-09 15:37 UTC (permalink / raw)
  To: John Linville; +Cc: wireless

[-- Attachment #1: Type: text/plain, Size: 1994 bytes --]

If you are implementing kernel 2.6.30-rc1 from wireless-testing, there is a
regression that will hit you if you have the ACPI battery routines enabled. The
symptom is an oops on boot with the line "> BUG: unable to handle kernel NULL
pointer dereference at (null)". The patch for this, which comes from
2.6.30-rc1-git1 in Linus's tree, is as follows:

==============================================

commit 5d38258ec026921a7b266f4047ebeaa75db358e5
Author: Vegard Nossum <vegard.nossum@gmail.com>
Date:   Tue Apr 7 10:55:38 2009 +0200

    ACPI battery: fix async boot oops

    > BUG: unable to handle kernel NULL pointer dereference at (null)

    What happens is that the battery module's init sections are being freed
    before the async callback (which was marked __init) has run. This theory
    is supported by the fact that the bad RIP value is a vmalloc address.

    The immediate fix is to make this a non-init call.

    (A better long-term fix is of course to wait with init-section unloading
    until a module's async initcalls have been run, which would allow us to
    discard this function which is still only run once, after all. Perhaps a
    new async_initcall() function for the async/module API, if this is needed
    for other modules in the future?)

    Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
    Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
    Tested-by: Alessandro Suardi <alessandro.suardi@gmail.com>
    Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
    Signed-off-by: Len Brown <len.brown@intel.com>

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b0de631..3c7d894 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -903,7 +903,7 @@ static struct acpi_driver acpi_battery_driver = {
 		},
 };

-static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
+static void acpi_battery_init_async(void *unused, async_cookie_t cookie)
 {
 	if (acpi_disabled)
 		return;


----

Larry

[-- Attachment #2: battery_init_async --]
[-- Type: text/plain, Size: 1602 bytes --]

commit 5d38258ec026921a7b266f4047ebeaa75db358e5
Author: Vegard Nossum <vegard.nossum@gmail.com>
Date:   Tue Apr 7 10:55:38 2009 +0200

    ACPI battery: fix async boot oops
    
    > BUG: unable to handle kernel NULL pointer dereference at (null)
    
    What happens is that the battery module's init sections are being freed
    before the async callback (which was marked __init) has run. This theory
    is supported by the fact that the bad RIP value is a vmalloc address.
    
    The immediate fix is to make this a non-init call.
    
    (A better long-term fix is of course to wait with init-section unloading
    until a module's async initcalls have been run, which would allow us to
    discard this function which is still only run once, after all. Perhaps a
    new async_initcall() function for the async/module API, if this is needed
    for other modules in the future?)
    
    Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
    Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
    Tested-by: Alessandro Suardi <alessandro.suardi@gmail.com>
    Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
    Signed-off-by: Len Brown <len.brown@intel.com>

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b0de631..3c7d894 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -903,7 +903,7 @@ static struct acpi_driver acpi_battery_driver = {
 		},
 };
 
-static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
+static void acpi_battery_init_async(void *unused, async_cookie_t cookie)
 {
 	if (acpi_disabled)
 		return;


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

end of thread, other threads:[~2009-04-10  5:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 15:37 Another regression in 2.6.30-rc1 Larry Finger
2009-04-10  4:34 ` Kalle Valo
2009-04-10  4:59   ` Larry Finger
2009-04-10  5:13     ` Sedat Dilek
2009-04-10  5:19       ` Kalle Valo

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 NNTP newsgroup(s).