Skip to content
Commit 5d38258e authored by Vegard Nossum's avatar Vegard Nossum Committed by Len Brown
Browse files

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: default avatarArkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
Tested-by: default avatarAlessandro Suardi <alessandro.suardi@gmail.com>
Tested-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent a3c27056
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment