]> git.baikalelectronics.ru Git - kernel.git/commit
ipc/sem.c: bugfix for semctl(,,GETZCNT)
authorManfred Spraul <manfred@colorfullife.com>
Fri, 6 Jun 2014 21:37:47 +0000 (14:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2014 23:08:15 +0000 (16:08 -0700)
commitceaba41339ad697da22c930e8a9015ad46c8fc66
tree32bce71a3486a217a3b87b86ac55f9b69e75eff6
parent5f17a70ddaa6faa2f01406375a87ce395e8ce824
ipc/sem.c: bugfix for semctl(,,GETZCNT)

GETZCNT is supposed to return the number of threads that wait until a
semaphore value becomes 0.

The current implementation overlooks complex operations that contain
both wait-for-zero operation and operations that alter at least one
semaphore.

The patch fixes that.  It's intentionally copy&paste, this will be
cleaned up in the next patch.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/sem.c