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 <[email protected]> > Reported-by: Dmitry Vyukov <[email protected]> > Link: > https://lkml.kernel.org/r/CACT4Y+Y908EjM2z=706dv4rv6dwtxtlk9nfg9_7dhrmlppb...@mail.gmail.com
Acked-by: Kirill A. Shutemov <[email protected]> -- Kirill A. Shutemov

