]> git.baikalelectronics.ru Git - kernel.git/commit
ipc: move locking out of ipcctl_pre_down_nolock
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Mon, 8 Jul 2013 23:01:12 +0000 (16:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:27 +0000 (10:33 -0700)
commitb22720b0a6ed4d1b366201b84307af5e9f47faa0
treeb95f3b875a5f4c927b0f27cc3c7ddcba5cc8e1e8
parent69f35e70fbb196d563762e1bf13c2168ad033657
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/msg.c
ipc/sem.c
ipc/shm.c
ipc/util.c