All of lore.kernel.org
 help / color / mirror / Atom feed
From: John M Collins <jmc@xisl.com>
To: linux-kernel@vger.kernel.org
Subject: Minor Bug with System 5 Semaphores
Date: Fri, 27 Jun 2003 09:33:46 +0100	[thread overview]
Message-ID: <3EFC016A.7080207@xisl.com> (raw)

Please CC me on any reply as I'm not subscribed.

I've come across what seems to me to be a minor bug on System 5 semaphores.

When a process which has used a set of semaphores exits, the process id 
of the exiting process is assigned to the "sempid" of every semaphore in 
the set, not just the ones that the process has changed.

This seems to me because in kernel 2.4.21/ipc/sem.c line 1062

sem->sempid = current->pid;

should be made conditional on u->semadj[i] being non-zero.

Personally I think it would be useful to omit this assignment altogether 
and have the "sempid" value reflect the last explicit semaphore 
operation rather than the implicit ones caused by "undos".

-- 
John Collins Xi Software Ltd www.xisl.com



                 reply	other threads:[~2003-06-27  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EFC016A.7080207@xisl.com \
    --to=jmc@xisl.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.