lkml.org 
[lkml]   [2018]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 027/496] kasan: fix memory hotplug during boot
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: David Hildenbrand <david@redhat.com>

    commit 3f1959721558a976aaf9c2024d5bc884e6411bf7 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: 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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    mm/kasan/kasan.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/mm/kasan/kasan.c
    +++ b/mm/kasan/kasan.c
    @@ -843,5 +843,5 @@ static int __init kasan_memhotplug_init(
    return 0;
    }

    -module_init(kasan_memhotplug_init);
    +core_initcall(kasan_memhotplug_init);
    #endif

    \
     
     \ /
      Last update: 2018-05-28 15:49    [W:4.387 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site