linux-stable/mm/kasan
David Hildenbrand 1da530fe15 kasan: fix memory hotplug during boot
commit 3f19597215 upstream.

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: 786a895991 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:51:50 +02:00
..
kasan.c kasan: fix memory hotplug during boot 2018-05-30 07:51:50 +02:00
kasan.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kasan_init.c mm/kasan/kasan_init.c: use kasan_zero_pud for p4d table 2017-07-10 16:32:33 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quarantine.c kasan: fix races in quarantine_remove_cache() 2017-03-09 17:01:10 -08:00
report.c kasan: avoid -Wmaybe-uninitialized warning 2017-08-02 16:34:46 -07:00