]> git.hungrycats.org Git - linux/commit
[PATCH] Remove unneeded unlock in ipc/sem.c
authorAndrew Morton <akpm@osdl.org>
Fri, 12 Mar 2004 00:16:39 +0000 (16:16 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 12 Mar 2004 00:16:39 +0000 (16:16 -0800)
commit644a73ebc718a500f7f39107ad321de46e407cc2
tree6c8428ac7aa6152357b6c58b3368d655f3a05186
parent2e83d38ae4c483813edc544265b39ee5e26f9b88
[PATCH] Remove unneeded unlock in ipc/sem.c

From: Manfred Spraul <manfred@colorfullife.com>

sem_revalidate checks that a semaphore array didn't disappear while the
code was running without the semaphore array spinlock.  If the array
disappeared, then it will return without holding a lock.  find_undo calls
sem_revalidate and then sem_unlock, even if sem_revalidate failed.  The
sem_unlock call must be removed.

Mingming Cao reported a spinlock deadlock with sysv semaphores.  A
superflous unlock doesn't explain the deadlock, but it's obviously a bug.
ipc/sem.c