From: David Hildenbrand Date: Fri, 25 May 2018 21:48:08 +0000 (-0700) Subject: kasan: free allocated shadow memory on MEM_CANCEL_ONLINE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b052960484fd40d6144a78773313c17154443177;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git kasan: free allocated shadow memory on MEM_CANCEL_ONLINE commit ed1596f9ab958dd156a66c9ff1029d3761c1786a upstream. We have to free memory again when we cancel onlining, otherwise a later onlining attempt will fail. Link: http://lkml.kernel.org/r/20180522100756.18478-2-david@redhat.com Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug") Signed-off-by: David Hildenbrand Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 858b96057e04..bb44af48587f 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c @@ -811,6 +811,7 @@ static int __meminit kasan_mem_notifier(struct notifier_block *nb, kmemleak_ignore(ret); return NOTIFY_OK; } + case MEM_CANCEL_ONLINE: case MEM_OFFLINE: { struct vm_struct *vm;