]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc: move locking out of ipcctl_pre_down_nolock
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Wed, 19 Jun 2013 00:08:28 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:45 +0000 (17:27 +1000)
commit7f170c45e63421ef1ee5759b18efbfba9ad6bbb1
tree62f2253dc53b614d6875db83a922759d0da50dbe
parent1a845bcd81b4e9b0334dbd130833d7b54bd35e4e
ipc: move locking out of ipcctl_pre_down_nolock

This function currently acquires both the rw_mutex and the rcu lock on
successful lookups, leaving the callers to explicitly unlock them,
creating another two level locking situation.

Make the callers (including those that still use ipcctl_pre_down())
explicitly lock and unlock the rwsem and rcu lock.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/msg.c
ipc/sem.c
ipc/shm.c
ipc/util.c