All of lore.kernel.org
 help / color / mirror / Atom feed
* Minor Bug with System 5 Semaphores
@ 2003-06-27  8:33 John M Collins
  0 siblings, 0 replies; only message in thread
From: John M Collins @ 2003-06-27  8:33 UTC (permalink / raw)
  To: linux-kernel

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-27  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-27  8:33 Minor Bug with System 5 Semaphores John M Collins

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.