lkml.org 
[lkml]   [2016]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Don't set sempid in semctl syscall.
From
Date
Hi,

On 02/26/2016 01:21 PM, PrasannaKumar Muralidharan wrote:
> From: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
>
> As described in bug #112271 (bugzilla.kernel.org/show_bug.cgi?id=112271)
> don't set sempid in semctl syscall. Set sempid only when semop is called.
I disagree with the bug report:

sempid is (and always was on Linux) the pid of the last task that modified the semaphore:
It is updated for semop, SETVAL and undo adjustment on process exit.
And - that is a bug: sempid is not updated for SETALL :-(


With regard to setting sempid on SETVAL,

- Opensolaris sets sempid on SETVAL and SETALL
http://minnie.tuhs.org/cgi-bin/utree.pl?file=OpenSolaris_b135/uts/common/syscall/sem.c
- Darwin sets sempid on SETVAL and SETALL
http://fxr.watson.org/fxr/source//bsd/kern/sysv_sem.c?v=xnu-1456.1.26

Note:
For sem_otime and sem_ctime, there are also subtile differences between
the sysv implementations.
What should we do there?

Here is my last review (already a few years old - some links may be
stale, perhaps a few more implementations are now available)
http://calculix-rpm.sourceforge.net/sysvsem.html

--
Manfred

\
 
 \ /
  Last update: 2016-02-26 22:01    [W:0.086 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site