linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* locking question: do_mmap(), do_munmap()
@ 1999-10-09 12:48 Manfred Spraul
  1999-10-09 13:12 ` Alexander Viro
  0 siblings, 1 reply; 48+ messages in thread
From: Manfred Spraul @ 1999-10-09 12:48 UTC (permalink / raw)
  To: linux-kernel, linux-mm

which semaphores/spinlocks protect do_mmap() and do_munmap()?

do_mmap():
	I wrote a test patch, and I found out that some (all?) callers call
lock_kernel(), but that mm->mmap_sem is _NOT ACQUIRED_. Eg
sys_uselib()-> do_load_elf_??() -> do_mmap().

do_munmap():
???? I think here is a race:
sys_munmap() doesn't call lock_kernel(), it only acquires mm->mmap_sem.
do_mmap() internally calls do_munmap(), ie with the kernel lock, but
without mm->mmap_sem.

What about adding debugging runtime checks to these function?
ie #defines which call down_trylock() and spin_trylock() and oops on
missing locks?
We could define them to "(void)0" before 2.4.


--
	Manfred
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 48+ messages in thread
[parent not found: <Pine.LNX.4.10.9910101713010.364-100000@alpha.random>]

end of thread, other threads:[~1999-10-15 17:50 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-09 12:48 locking question: do_mmap(), do_munmap() Manfred Spraul
1999-10-09 13:12 ` Alexander Viro
1999-10-09 13:17   ` Manfred Spraul
1999-10-09 13:38     ` Alexander Viro
1999-10-09 16:01   ` Andrea Arcangeli
1999-10-10 13:05     ` Manfred Spraul
1999-10-11 15:09       ` Stephen C. Tweedie
1999-10-11 15:05     ` Stephen C. Tweedie
     [not found] <Pine.LNX.4.10.9910101713010.364-100000@alpha.random>
1999-10-10 15:52 ` Manfred Spraul
1999-10-10 16:07   ` Alexander Viro
1999-10-10 16:25     ` Alexander Viro
1999-10-10 16:45       ` Manfred Spraul
1999-10-10 17:25         ` Alexander Viro
1999-10-10 17:12       ` Andrea Arcangeli
1999-10-10 17:48         ` Alexander Viro
1999-10-10 18:42           ` Manfred Spraul
1999-10-10 19:03             ` Alexander Viro
1999-10-10 21:31               ` Manfred Spraul
1999-10-10 21:53               ` Andrea Arcangeli
1999-10-10 22:34                 ` Alexander Viro
1999-10-10 23:28                   ` Andrea Arcangeli
1999-10-11 15:50               ` Stephen C. Tweedie
1999-10-11 16:05                 ` Alexander Viro
1999-10-11 18:02                   ` Manfred Spraul
1999-10-11 19:07                     ` Kanoj Sarcar
1999-10-11 22:23                       ` Stephen C. Tweedie
1999-10-13  1:25                         ` Kanoj Sarcar
1999-10-13  7:32                           ` Manfred Spraul
1999-10-15  9:58                             ` Ralf Baechle
1999-10-15 17:50                               ` Kanoj Sarcar
1999-10-13 10:45                           ` Stephen C. Tweedie
1999-10-11 20:15                     ` Stephen C. Tweedie
1999-10-11 21:14                       ` Manfred Spraul
1999-10-11 21:37                     ` Alexander Viro
1999-10-11 22:13                       ` Manfred Spraul
1999-10-11 22:22                     ` Stephen C. Tweedie
1999-10-11 23:01                       ` Alexander Viro
1999-10-13 10:16                         ` Stephen C. Tweedie
1999-10-11 20:13                   ` Stephen C. Tweedie
1999-10-11 21:40                     ` Alexander Viro
1999-10-11 22:20                       ` Stephen C. Tweedie
1999-10-11 22:31                         ` Alexander Viro
1999-10-13 10:25                           ` Stephen C. Tweedie
1999-10-11 15:47             ` Stephen C. Tweedie
1999-10-11 15:43         ` Stephen C. Tweedie
1999-10-10 16:56     ` Andrea Arcangeli
1999-10-11 15:41     ` Stephen C. Tweedie
1999-10-11 15:52       ` Alexander Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox