linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Chen Gang <gang.chen.5i5j@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	Piotr Kwapulinski <kwapulinski.piotr@gmail.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Hugh Dickins <hughd@google.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	syzkaller <syzkaller@googlegroups.com>,
	Kostya Serebryany <kcc@google.com>,
	Alexander Potapenko <glider@google.com>
Subject: Re: mm: BUG in expand_downwards
Date: Wed, 27 Jan 2016 22:11:44 +0100	[thread overview]
Message-ID: <CACT4Y+Z86=NoNPrS-vgtJiB54Akwq6FfAPf2wnBA1FX2BHafWQ@mail.gmail.com> (raw)
In-Reply-To: <20160127194132.GA896@redhat.com>

On Wed, Jan 27, 2016 at 8:41 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> On 01/27, Dmitry Vyukov wrote:
>>
>> On Wed, Jan 27, 2016 at 1:24 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>> > On Wed, Jan 27, 2016 at 12:49 PM, Konstantin Khlebnikov
>> > <koct9i@gmail.com> wrote:
>> >> It seems anon_vma appeared between lock and unlock.
>> >>
>> >> This should fix the bug and make code faster (write lock isn't required here)
>> >>
>> >> --- a/mm/mmap.c
>> >> +++ b/mm/mmap.c
>> >> @@ -453,12 +453,16 @@ static void validate_mm(struct mm_struct *mm)
>> >>         struct vm_area_struct *vma = mm->mmap;
>> >>
>> >>         while (vma) {
>> >> +               struct anon_vma *anon_vma = vma->anon_vma;
>> >>                 struct anon_vma_chain *avc;
>> >>
>> >> -               vma_lock_anon_vma(vma);
>> >> -               list_for_each_entry(avc, &vma->anon_vma_chain, same_vma)
>> >> -                       anon_vma_interval_tree_verify(avc);
>> >> -               vma_unlock_anon_vma(vma);
>> >> +               if (anon_vma) {
>> >> +                       anon_vma_lock_read(anon_vma);
>> >> +                       list_for_each_entry(avc, &vma->anon_vma_chain, same_vma)
>> >> +                               anon_vma_interval_tree_verify(avc);
>> >> +                       anon_vma_unlock_read(anon_vma);
>> >> +               }
>> >> +
>> >>                 highest_address = vma->vm_end;
>> >>                 vma = vma->vm_next;
>> >>                 i++;
>> >
>> >
>> > Now testing with this patch. Thanks for quick fix!
>>
>>
>> Hit the same BUG with this patch.
>
> Do you mean the same "bad unlock balance detected" BUG? this should be "obviously"
> fixed by the patch above...
>
> Or you mean the 2nd VM_BUG_ON_MM() ?
>
>> Please try to reproduce it locally and test.
>
> tried to reproduce, doesn't work.


Sorry, I meant only the second once. The mm bug.
I guess you need at least CONFIG_DEBUG_VM.  Run it in a tight parallel
loop with CPU oversubscription (e.g. 32 parallel processes on 2 cores)
for  at least an hour.

--
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-01-27 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 10:51 Dmitry Vyukov
2016-01-27 11:49 ` Konstantin Khlebnikov
2016-01-27 12:24   ` Dmitry Vyukov
2016-01-27 14:42     ` Dmitry Vyukov
2016-01-27 19:41       ` Oleg Nesterov
2016-01-27 21:11         ` Dmitry Vyukov [this message]
2016-01-28 15:47           ` Andrea Arcangeli
2016-01-29 10:39             ` Dmitry Vyukov

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='CACT4Y+Z86=NoNPrS-vgtJiB54Akwq6FfAPf2wnBA1FX2BHafWQ@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gang.chen.5i5j@gmail.com \
    --cc=glider@google.com \
    --cc=hughd@google.com \
    --cc=kcc@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=koct9i@gmail.com \
    --cc=kwapulinski.piotr@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=oleg@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=syzkaller@googlegroups.com \
    /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