]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ipc,shm: shorten critical region for shmctl
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Wed, 11 Sep 2013 21:26:21 +0000 (14:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Oct 2013 17:55:00 +0000 (10:55 -0700)
commit610a094ba321d59d1bae2535885f698c07a52daa
tree0802a8eea4a38b2eba1da78f1651fe17e8986f66
parent1c7ee8a0cc8ba17b5f99133b004edfe64fb496fb
ipc,shm: shorten critical region for shmctl

commit 2caacaa82a51b78fc0c800e206473874094287ed upstream.

With the *_INFO, *_STAT, IPC_RMID and IPC_SET commands already optimized,
deal with the remaining SHM_LOCK and SHM_UNLOCK commands.  Take the
shm_perm lock after doing the initial auditing and security checks.  The
rest of the logic remains unchanged.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ipc/shm.c