linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Menzel <pmenzel+linux-kasan-dev@molgen.mpg.de>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [PATCH] mm/kasan: Don't vfree() nonexistent vm_area.
Date: Tue, 22 May 2018 19:44:06 +0300	[thread overview]
Message-ID: <4fc394ae-65e8-7c51-112a-81bee0fb8429@virtuozzo.com> (raw)
In-Reply-To: <20180201163349.8700-1-aryabinin@virtuozzo.com>



On 02/01/2018 07:33 PM, Andrey Ryabinin wrote:
> KASAN uses different routines to map shadow for hot added memory and memory
> obtained in boot process. Attempt to offline memory onlined by normal boot
> process leads to this:
> 
>     Trying to vfree() nonexistent vm area (000000005d3b34b9)
>     WARNING: CPU: 2 PID: 13215 at mm/vmalloc.c:1525 __vunmap+0x147/0x190
> 
>     Call Trace:
>      kasan_mem_notifier+0xad/0xb9
>      notifier_call_chain+0x166/0x260
>      __blocking_notifier_call_chain+0xdb/0x140
>      __offline_pages+0x96a/0xb10
>      memory_subsys_offline+0x76/0xc0
>      device_offline+0xb8/0x120
>      store_mem_state+0xfa/0x120
>      kernfs_fop_write+0x1d5/0x320
>      __vfs_write+0xd4/0x530
>      vfs_write+0x105/0x340
>      SyS_write+0xb0/0x140
> 
> Obviously we can't call vfree() to free memory that wasn't allocated via
> vmalloc(). Use find_vm_area() to see if we can call vfree().
> 
> Unfortunately it's a bit tricky to properly unmap and free shadow allocated
> during boot, so we'll have to keep it. If memory will come online again
> that shadow will be reused.
> 
> Fixes: fa69b5989bb0 ("mm/kasan: add support for memory hotplug")
> Reported-by: Paul Menzel <pmenzel+linux-kasan-dev@molgen.mpg.de>
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: <stable@vger.kernel.org>
> ---

This seems stuck in -mm. Andrew, can we proceed?

  parent reply	other threads:[~2018-05-22 16:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 16:46 Trying to vfree() nonexistent vm area (000000005d3b34b9) Paul Menzel
2018-02-01 16:33 ` [PATCH] mm/kasan: Don't vfree() nonexistent vm_area Andrey Ryabinin
2018-02-01 19:57   ` Matthew Wilcox
2018-02-01 20:22     ` Andrey Ryabinin
2018-02-02 17:20       ` Matthew Wilcox
2018-02-05  8:48         ` Andrey Ryabinin
2018-05-18 15:57   ` David Hildenbrand
2018-05-18 16:01     ` David Hildenbrand
2018-05-22 16:44   ` Andrey Ryabinin [this message]
2018-05-22 21:03     ` Andrew Morton
2018-05-23 12:33       ` Andrey Ryabinin
2018-05-26  3:31         ` [PATCH] mm-kasan-dont-vfree-nonexistent-vm_area-fix kbuild test robot
2018-05-26  3:48           ` Andrew Morton
2018-05-28  4:13             ` Ian Kent
2018-05-28  4:39               ` Ian Kent
2018-05-29  4:01                 ` Ian Kent
2018-05-30 11:53         ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fc394ae-65e8-7c51-112a-81bee0fb8429@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pmenzel+linux-kasan-dev@molgen.mpg.de \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).