Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1319852
| From | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: mm: BUG in expand_downwards |
| Date | 2016-01-27 22:20 +0100 |
| Message-ID | <qVFFo-1hk-15@gated-at.bofh.it> (permalink) |
| References | <qVvZo-2he-23@gated-at.bofh.it> <qVwVs-2WM-1@gated-at.bofh.it> <qVxou-3nT-23@gated-at.bofh.it> <qVzzY-4VL-19@gated-at.bofh.it> <qVEgj-6M-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mm: BUG in expand_downwards Dmitry Vyukov <dvyukov@google.com> - 2016-01-27 12:00 +0100
Re: mm: BUG in expand_downwards Konstantin Khlebnikov <koct9i@gmail.com> - 2016-01-27 13:00 +0100
Re: mm: BUG in expand_downwards Dmitry Vyukov <dvyukov@google.com> - 2016-01-27 13:30 +0100
Re: mm: BUG in expand_downwards Dmitry Vyukov <dvyukov@google.com> - 2016-01-27 15:50 +0100
Re: mm: BUG in expand_downwards Oleg Nesterov <oleg@redhat.com> - 2016-01-27 20:50 +0100
Re: mm: BUG in expand_downwards Dmitry Vyukov <dvyukov@google.com> - 2016-01-27 22:20 +0100
Re: mm: BUG in expand_downwards Andrea Arcangeli <aarcange@redhat.com> - 2016-01-28 16:50 +0100
Re: mm: BUG in expand_downwards Dmitry Vyukov <dvyukov@google.com> - 2016-01-29 11:40 +0100
csiph-web