From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755353AbcBZWQR (ORCPT ); Fri, 26 Feb 2016 17:16:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:39429 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755252AbcBZWQP (ORCPT ); Fri, 26 Feb 2016 17:16:15 -0500 Date: Fri, 26 Feb 2016 14:15:51 -0800 From: Davidlohr Bueso To: Manfred Spraul Cc: PrasannaKumar Muralidharan , akpm@linux-foundation.org, herton@redhat.com, penguin-kernel@i-love.sakura.ne.jp, rientjes@google.com, joe@perches.com, linux-kernel@vger.kernel.org, Michael Kerrisk Subject: Re: [PATCH] Don't set sempid in semctl syscall. Message-ID: <20160226221551.GA18437@linux-uzut.site> References: <1456489298-20224-1-git-send-email-prasannatsmkumar@gmail.com> <56D0B354.50106@colorfullife.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <56D0B354.50106@colorfullife.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >>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