diff options
author | Konstantin Khlebnikov <koct9i@gmail.com> | 2016-02-06 02:36:50 +0300 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2016-02-25 13:34:44 +0300 |
commit | 745b4a707a3c9e522279973763562582f256a7b9 (patch) | |
tree | bd0b30ebfcdf17faf6dc64e716cb704e1a19f765 /include/sound | |
parent | 6ac0f413b48db1ae90d9f1aab24f60e5327a629b (diff) | |
download | linux-745b4a707a3c9e522279973763562582f256a7b9.tar.xz |
mm: replace vma_lock_anon_vma with anon_vma_lock_read/write
commit 12352d3cae2cebe18805a91fab34b534d7444231 upstream.
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.
Link: https://lkml.kernel.org/r/CACT4Y+Y908EjM2z=706dv4rV6dWtxTLK9nFg9_7DhRMLppBo2g@mail.gmail.com
Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/sound')
0 files changed, 0 insertions, 0 deletions