Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1368029 > unrolled thread

[PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON

Started byKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
First post2016-03-31 11:10 +0200
Last post2016-03-31 14:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2016-03-31 11:10 +0200
    Re: [PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON Vlastimil Babka <vbabka@suse.cz> - 2016-03-31 14:50 +0200

#1368029 — [PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON

FromKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date2016-03-31 11:10 +0200
Subject[PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON
Message-ID<riGM2-2Es-19@gated-at.bofh.it>
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>
---
 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);

[toc] | [next] | [standalone]


#1368258

FromVlastimil Babka <vbabka@suse.cz>
Date2016-03-31 14:50 +0200
Message-ID<riKcV-56B-7@gated-at.bofh.it>
In reply to#1368029
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>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web