]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/mlock: prepare params outside critical region
authorDavidlohr Bueso <davidlohr@hp.com>
Mon, 16 Dec 2013 23:45:07 +0000 (10:45 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 16 Dec 2013 23:45:07 +0000 (10:45 +1100)
commit45fc5d72f19903891b817e71a95b5cf82f31ea1e
treec8e3a578b0d97fa02048ba8ef5592ef333dd66cc
parent12d867038cac57d2b856e002f2130f3d2f7ec46d
mm/mlock: prepare params outside critical region

All mlock related syscalls prepare lock limits, lengths and start
parameters with the mmap_sem held.  Move this logic outside of the
critical region.  For the case of mlock, continue incrementing the amount
already locked by mm->locked_vm with the rwsem taken.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Reviewed-by: Michel Lespinasse <walken@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mlock.c