From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756765AbcCaMtX (ORCPT ); Thu, 31 Mar 2016 08:49:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:33756 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbcCaMtW (ORCPT ); Thu, 31 Mar 2016 08:49:22 -0400 Subject: Re: [PATCH] mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON To: Konstantin Khlebnikov , Andrew Morton References: <145941463036.29562.15629573511013443187.stgit@buzz> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" From: Vlastimil Babka Message-ID: <56FD1CCE.3020809@suse.cz> Date: Thu, 31 Mar 2016 14:49:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <145941463036.29562.15629573511013443187.stgit@buzz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Suggested-by: Vasily Averin Acked-by: Vlastimil Babka > --- > 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: email@kvack.org >