mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* shmdt fix
@ 2002-03-15 21:31 Paul Larson
  2002-03-19 11:41 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Larson @ 2002-03-15 21:31 UTC (permalink / raw)
  To: Marcelo Tosati; +Cc: lkml


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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-19 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-15 21:31 shmdt fix Paul Larson
2002-03-19 11:41 ` Marcelo Tosatti

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®