ipc,msg: shorten critical region in msgctl_down
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Mon, 8 Jul 2013 23:01:13 +0000 (16:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Oct 2013 14:45:46 +0000 (07:45 -0700)
commitf880aca02ec5531b5ce62b10dae6311001a34804
tree03aa0f812c481323b28cf491d7bed03a8e88c83b
parentac9bc6e396285ab732dd869c3edb353662134022
ipc,msg: shorten critical region in msgctl_down

commit 15724ecb7e9bab35fc694c666ad563adba820cc3 upstream.

Instead of holding the ipc lock for the entire function, use the
ipcctl_pre_down_nolock and only acquire the lock for specific commands:
RMID and SET.

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>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ipc/msg.c