David Hildenbrand 3f19597215 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/20180522100756.18478-3-david@redhat.com
Fixes: 786a8959912e ("kasan: disable memory hotplug")
Signed-off-by: David Hildenbrand <david@redhat.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-05-25 18:12:11 -07:00
..
2017-06-05 16:59:12 +02:00
2017-02-27 18:43:47 -08:00
2017-11-15 18:21:05 -08:00
2018-04-11 10:28:39 -07:00
2018-04-07 12:08:19 -07:00
2018-04-11 10:28:32 -07:00
2018-04-20 17:18:35 -07:00
2018-04-11 10:28:39 -07:00
2018-04-20 17:18:35 -07:00
2018-04-11 10:28:39 -07:00
2017-11-15 18:21:01 -08:00
2018-04-11 10:28:39 -07:00
2018-04-11 10:28:39 -07:00
2018-04-13 17:10:27 -07:00
2018-04-11 10:28:39 -07:00
2018-05-11 17:28:45 -07:00
2018-02-06 18:32:48 -08:00