linux/ipc
Manfred Spraul 9b44ee2eef ipc/sem.c: add a printk_once for semctl(GETNCNT/GETZCNT)
The actual Linux implementation for semctl(GETNCNT) and semctl(GETZCNT)
always (since 0.99.10) reported a thread as sleeping on all semaphores
that are listed in the semop() call.

The documented behavior (both in the Linux man page and in the Single
Unix Specification) is that a task should be reported on exactly one
semaphore: The semaphore that caused the thread to got to sleep.

This patch adds a pr_info_once() that is triggered if a thread hits the
relevant case.

The code triggers slightly too often, otherwise it would be necessary to
replicate the old code.  As there are no known users of GETNCNT or
GETZCNT, this is done to prevent unnecessary bloat.

The task that triggered is reported with name (tsk->comm) and pid.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-06 16:08:15 -07:00
..
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
compat.c ipc, kernel: use Linux headers 2014-06-06 16:08:14 -07:00
compat_mq.c ipc, kernel: use Linux headers 2014-06-06 16:08:14 -07:00
ipc_sysctl.c ipc: use device_initcall 2014-04-07 16:36:11 -07:00
ipcns_notifier.c ipc: do not use a negative value to re-enable msgmni automatic recomputing 2008-07-25 10:53:42 -07:00
mq_sysctl.c ipc,mqueue: remove limits for the amount of system-wide queues 2014-02-25 15:25:45 -08:00
mqueue.c ipc: use device_initcall 2014-04-07 16:36:11 -07:00
msg.c ipc,msg: document volatile r_msg 2014-06-06 16:08:15 -07:00
msgutil.c ipc, msg: fix message length check for negative values 2013-11-13 12:09:36 +09:00
namespace.c ipc: drop ipc_lock_by_ptr 2013-09-11 15:59:44 -07:00
sem.c ipc/sem.c: add a printk_once for semctl(GETNCNT/GETZCNT) 2014-06-06 16:08:15 -07:00
shm.c ipc/shm.c: check for integer overflow during shmget. 2014-06-06 16:08:14 -07:00
syscall.c get rid of union semop in sys_semctl(2) arguments 2013-03-05 15:14:16 -05:00
util.c ipc, kernel: clear whitespace 2014-06-06 16:08:14 -07:00
util.h ipc, kernel: clear whitespace 2014-06-06 16:08:14 -07:00