From: Paul Larson <plars@austin.ibm.com>
To: Marcelo Tosati <marcelo@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: shmdt fix
Date: 15 Mar 2002 15:31:44 -0600 [thread overview]
Message-ID: <1016227905.28607.36.camel@plars.austin.ibm.com> (raw)
Marcelo, in 2.4.19-pre1 the changelog said that the shmdt fix was
included, but it is still failing the LTP testcase that found this
problem. There is a small, but important set of {}'s that got missed,
so it is still always returning 0 even if there is nothing to detach.
The attached diff will clean this up on 2.4.19-pre3.
Thanks,
Paul Larson
diff -Naur linux/ipc/shm.c linux-shmdt/ipc/shm.c
--- linux/ipc/shm.c Fri Mar 15 15:13:07 2002
+++ linux-shmdt/ipc/shm.c Fri Mar 15 15:16:21 2002
@@ -678,9 +678,10 @@
for (shmd = mm->mmap; shmd; shmd = shmdnext) {
shmdnext = shmd->vm_next;
if (shmd->vm_ops == &shm_vm_ops
- && shmd->vm_start - (shmd->vm_pgoff << PAGE_SHIFT) == (ulong) shmaddr)
+ && shmd->vm_start - (shmd->vm_pgoff << PAGE_SHIFT) == (ulong) shmaddr) {
do_munmap(mm, shmd->vm_start, shmd->vm_end - shmd->vm_start);
retval = 0;
+ }
}
up_write(&mm->mmap_sem);
return retval;
next reply other threads:[~2002-03-15 21:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-15 21:31 Paul Larson [this message]
2002-03-19 11:41 ` Marcelo Tosatti
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=1016227905.28607.36.camel@plars.austin.ibm.com \
--to=plars@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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
all inboxes | Powered by JetHome®