All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] cleanup of ipc/msg.c
Date: Sun, 04 Jul 2004 00:09:50 +0200	[thread overview]
Message-ID: <40E72EAE.2060806@colorfullife.com> (raw)

Hi,

Attached is a cleanup of the main loops in sys_msgrcv and sys_msgsnd, 
based on ipc_lock_by_ptr(). Most backward gotos are gone, instead normal 
"for(;;)" loops until a suitable message is found.

Additionally, the patch
- reintroduces lockless receive, same implementation as in ipc/mqueue.c.
- fixes a rare BUG(): if queue settings are changed with 
msgctl(,IPC_SET,) while a thread is sleeping in msgrcv() and the queue 
is then destroyed with msgctl(,IPC_RMID,) before the sleeping thread 
noticed the new configuration, then the BUG() is line 764 would trigger.

Andrew, could you add it to -mm? If it's too large then I'll split out 
the bugfix, it's a oneliner [remove the BUG()].

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>

             reply	other threads:[~2004-07-03 22:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-03 22:09 Manfred Spraul [this message]
2004-07-04 11:49 ` [PATCH] cleanup of ipc/msg.c Manfred Spraul

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=40E72EAE.2060806@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@osdl.org \
    --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.