From: Manfred Spraul <manfred@colorfullife.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] remove magic +1 from shm segment count
Date: Sun, 08 Aug 2004 21:19:35 +0200 [thread overview]
Message-ID: <41167CC7.5020102@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 509 bytes --]
Hi,
Michael Kerrisk found a bug in the shm accounting code:
sysv shm allows to create SHMMNI+1 shared memory segments, instead of
SHMMNI segments. The +1 is probably from the first shared anonymous
mapping implementation that used the sysv code to implement shared anon
mappings.
The implementation got replaced, it's now the other way around (sysv
uses the shared anon code), but the +1 remained.
Andrew - could you add the patch to your tree?
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
[-- Attachment #2: patch-ipcshm-count --]
[-- Type: text/plain, Size: 317 bytes --]
--- 2.6/ipc/shm.c 2004-08-07 11:14:24.000000000 +0200
+++ build-2.6/ipc/shm.c 2004-08-08 21:10:02.156421648 +0200
@@ -78,7 +78,7 @@
static inline int shm_addid(struct shmid_kernel *shp)
{
- return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni+1);
+ return ipc_addid(&shm_ids, &shp->shm_perm, shm_ctlmni);
}
reply other threads:[~2004-08-08 19:17 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=41167CC7.5020102@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox