mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
kasan: fix memory hotplug during boot
Using module_init() is wrong. E.g. ACPI adds and onlines memory before
our memory notifier gets registered.
This makes sure that ACPI memory detected during boot up will not result
in a kernel crash.
Easily reproducible with QEMU, just specify a DIMM when starting up.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 786a895991 ("kasan: disable memory hotplug")
Signed-off-by: David Hildenbrand <[email protected]>
Acked-by: Andrey Ryabinin <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ed1596f9ab
commit
3f19597215
1 changed files with 1 additions and 1 deletions
|
|
@ -898,5 +898,5 @@ static int __init kasan_memhotplug_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
module_init(kasan_memhotplug_init);
|
||||
core_initcall(kasan_memhotplug_init);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue