summaryrefslogtreecommitdiff
path: root/drivers/acpi/battery.c
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2009-04-07 10:55:38 +0200
committerLen Brown <len.brown@intel.com>2009-04-07 16:24:54 -0400
commit5d38258ec026921a7b266f4047ebeaa75db358e5 (patch)
tree899c26f6e0b63d9de56d2989b97d5da4737390e9 /drivers/acpi/battery.c
parenta3c270561ea4455cbcea0ac2b53335655d9fc805 (diff)
downloadlinux-stable-5d38258ec026921a7b266f4047ebeaa75db358e5.tar.gz
linux-stable-5d38258ec026921a7b266f4047ebeaa75db358e5.tar.bz2
linux-stable-5d38258ec026921a7b266f4047ebeaa75db358e5.zip
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>
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r--drivers/acpi/battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b0de6312919a..3c7d8942f23b 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;