linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON
Date: Thu, 31 Mar 2016 14:49:18 +0200	[thread overview]
Message-ID: <56FD1CCE.3020809@suse.cz> (raw)
In-Reply-To: <145941463036.29562.15629573511013443187.stgit@buzz>

On 03/31/2016 10:57 AM, Konstantin Khlebnikov wrote:
> This check effectively catches anon vma hierarchy inconsistence and some
> vma corruptions. It was effective for catching corner cases in anon vma
> reusing logic. For now this code seems stable so check could be hidden
> under CONFIG_DEBUG_VM and replaced with WARN because it's not so fatal.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Suggested-by: Vasily Averin <vvs@virtuozzo.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>   mm/rmap.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 395e314b7996..a8d52d3f40ed 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -409,7 +409,7 @@ void unlink_anon_vmas(struct vm_area_struct *vma)
>   	list_for_each_entry_safe(avc, next, &vma->anon_vma_chain, same_vma) {
>   		struct anon_vma *anon_vma = avc->anon_vma;
>
> -		BUG_ON(anon_vma->degree);
> +		VM_WARN_ON(anon_vma->degree);
>   		put_anon_vma(anon_vma);
>
>   		list_del(&avc->same_vma);
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>

      reply	other threads:[~2016-03-31 12:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31  8:57 [PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON Konstantin Khlebnikov
2016-03-31 12:49 ` Vlastimil Babka [this message]

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=56FD1CCE.3020809@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=khlebnikov@yandex-team.ru \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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).