]> git.baikalelectronics.ru Git - kernel.git/commit
ipc: fix double sem unlock in semctl error path
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 4 May 2013 17:25:11 +0000 (10:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 5 May 2013 00:19:59 +0000 (17:19 -0700)
commit4e88f9b800925c48cb2a8be0742f66fe51ed3024
tree06c5a391238bcf93bb3d7f2c587d069eeb6809e5
parent750d1fb31570675020f193426d03164f5884b143
ipc: fix double sem unlock in semctl error path

Fix another ipc locking buglet introduced by the scalability patches:
when semctl_down() was changed to delay the semaphore locking, one error
path for security_sem_semctl() went through the semaphore unlock logic
even though the semaphore had never been locked.

Introduced by commit 01b7ce229d2f ("ipc,sem: do not hold ipc lock more
than necessary")

Acked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/sem.c