diff mbox

[v2,1/2] kasan: free allocated shadow memory on MEM_CANCEL_ONLINE

Message ID 20180522100756.18478-2-david@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Hildenbrand May 22, 2018, 10:07 a.m. UTC
We have to free memory again when we cancel onlining, otherwise a later
onlining attempt will fail.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 mm/kasan/kasan.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrey Ryabinin May 22, 2018, 4:26 p.m. UTC | #1
On 05/22/2018 01:07 PM, David Hildenbrand wrote:
> We have to free memory again when we cancel onlining, otherwise a later
> onlining attempt will fail.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---

Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug")
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: <stable@vger.kernel.org>

>  mm/kasan/kasan.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c
> index 135ce2838c89..53564229674b 100644
> --- a/mm/kasan/kasan.c
> +++ b/mm/kasan/kasan.c
> @@ -867,6 +867,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;
>  
>
diff mbox

Patch

diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c
index 135ce2838c89..53564229674b 100644
--- a/mm/kasan/kasan.c
+++ b/mm/kasan/kasan.c
@@ -867,6 +867,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;