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

    This is a user-visible change, adding mtk.

    >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:

    This bug report really lacks any kind of motivation for this patch, not
    posix-friendly is pretty bogus. Albeit we are doing some false publicity.

    >
    >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 :-(

    Code-wise yeah, but we have such things in our docs (semctl.2):

    GETPID Return the value of sempid for the semnum-th semaphore of the set (i.e., the PID of the
    process that executed the last semop(2) call for the semnum-th semaphore of the set). The
    calling process must have read permission on the semaphore set.

    Furthermore, semop.2 is very explicit about sempid. That said, I am also weary of this
    change because we've been setting semval for semctl for so long.
    stuff).

    Thanks,
    Davidlohr

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