From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-kernel@vger.kernel.org, Dmitry Vyukov <dvyukov@google.com>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] mm: replace vma_lock_anon_vma with anon_vma_lock_read/write
Date: Tue, 2 Feb 2016 11:21:33 +0200 [thread overview]
Message-ID: <20160202092133.GA817@node.shutemov.name> (raw)
In-Reply-To: <145440421918.17103.16454803336779455616.stgit@zurg>
On Tue, Feb 02, 2016 at 12:10:19PM +0300, Konstantin Khlebnikov wrote:
> Sequence vma_lock_anon_vma() - vma_unlock_anon_vma() isn't safe if
> anon_vma appeared between lock and unlock. We have to check anon_vma
> first or call anon_vma_prepare() to be sure that it's here. There are
> only few users of these legacy helpers. Let's get rid of them.
>
> This patch fixes anon_vma lock imbalance in validate_mm().
> Write lock isn't required here, read lock is enough.
>
> And reorders expand_downwards/expand_upwards: security_mmap_addr() and
> wrapping-around check don't have to be under anon vma lock.
>
> Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
> Reported-by: Dmitry Vyukov <dvyukov@google.com>
> Link: https://lkml.kernel.org/r/CACT4Y+Y908EjM2z=706dv4rV6dWtxTLK9nFg9_7DhRMLppBo2g@mail.gmail.com
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-kernel@vger.kernel.org, Dmitry Vyukov <dvyukov@google.com>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] mm: replace vma_lock_anon_vma with anon_vma_lock_read/write
Date: Tue, 2 Feb 2016 11:21:33 +0200 [thread overview]
Message-ID: <20160202092133.GA817@node.shutemov.name> (raw)
In-Reply-To: <145440421918.17103.16454803336779455616.stgit@zurg>
On Tue, Feb 02, 2016 at 12:10:19PM +0300, Konstantin Khlebnikov wrote:
> Sequence vma_lock_anon_vma() - vma_unlock_anon_vma() isn't safe if
> anon_vma appeared between lock and unlock. We have to check anon_vma
> first or call anon_vma_prepare() to be sure that it's here. There are
> only few users of these legacy helpers. Let's get rid of them.
>
> This patch fixes anon_vma lock imbalance in validate_mm().
> Write lock isn't required here, read lock is enough.
>
> And reorders expand_downwards/expand_upwards: security_mmap_addr() and
> wrapping-around check don't have to be under anon vma lock.
>
> Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
> Reported-by: Dmitry Vyukov <dvyukov@google.com>
> Link: https://lkml.kernel.org/r/CACT4Y+Y908EjM2z=706dv4rV6dWtxTLK9nFg9_7DhRMLppBo2g@mail.gmail.com
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
next prev parent reply other threads:[~2016-02-02 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 9:10 [PATCH] mm: replace vma_lock_anon_vma with anon_vma_lock_read/write Konstantin Khlebnikov
2016-02-02 9:10 ` Konstantin Khlebnikov
2016-02-02 9:21 ` Kirill A. Shutemov [this message]
2016-02-02 9:21 ` Kirill A. Shutemov
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=20160202092133.GA817@node.shutemov.name \
--to=kirill@shutemov.name \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.