• Davidlohr Bueso's avatar
    ipc/sem: make semctl setting sempid consistent · a5f4db87
    Davidlohr Bueso authored
    As indicated by bug#112271, Linux sets the sempid value upon semctl, and
    not only for semop calls.  However, within semctl we only do this for
    SETVAL, leaving SETALL without updating the field, and therefore rather
    inconsistent behavior when compared to other Unices.
    
    There is really no documentation regarding this and therefore users
    should not make assumptions.  With this patch, along with updating
    semctl.2 manpages, this scenario should become less ambiguous As such,
    set sempid on SETALL cmd.
    
    Also update some in-code documentation, specifying where the sempid is
    set.
    
    Passes ltp and custom testcase where a child (fork) does SETALL to the
    set.
    Signed-off-by: 's avatarDavidlohr Bueso <dbueso@suse.de>
    Reported-by: 's avatarPhilip Semanchuk <linux_kernel.20.ick@spamgourmet.com>
    Cc: Michael Kerrisk <mtk.manpages@gmail.com>
    Cc: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
    Cc: Manfred Spraul <manfred@colorfullife.com>
    Cc: Herton R. Krzesinski <herton@redhat.com>
    Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
    a5f4db87
Name
Last commit
Last update
..
Makefile Loading commit data...
compat.c Loading commit data...
compat_mq.c Loading commit data...
ipc_sysctl.c Loading commit data...
mq_sysctl.c Loading commit data...
mqueue.c Loading commit data...
msg.c Loading commit data...
msgutil.c Loading commit data...
namespace.c Loading commit data...
sem.c Loading commit data...
shm.c Loading commit data...
syscall.c Loading commit data...
util.c Loading commit data...
util.h Loading commit data...