[PATCH 0/6] ipc/sem.c: Fix semctl(,,{GETNCNT,GETZCNT})

From: Manfred Spraul
Date: Sat May 10 2014 - 06:03:51 EST


Hi all,

According to the man page of semop(), semzcnt or semncnt are increased
exactly for the operation that couldn't proceed.

The Linux implementation always tried to be clever and to increase the counters
for all operations that might be the reason why a task sleeps.

The following patches fix that and make the code conform to the
documentation.

The series got fairly long, because I also noticed that semzcnt was calculated
incorrectly.

What do you think?
I ran a few test cases, and the semncnt and semzcnt counts now match
the expectation.

Is anyone aware of an application that uses GETNCNT or GETZCNT?

--
Manfred
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/