Skip to contentSkip to conversation

execve-question

DISCUSSION Manfred Spraul 2 participants 2 messages Oct 10, 1999 Memory management

lore
Share & tools
lore
#0 lore raw

what happens / should happen if I call execve() in a multi-threaded application?

I don't see that the mm structure is copied, and obviously noone acquires the mm->mmap_sem.

--
Manfred
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

#1 lore raw
Quoted 5 lines · Manfred Spraul

what happens / should happen if I call execve() in a multi-threaded application?

I don't see that the mm structure is copied, and obviously noone acquires the mm->mmap_sem.

Check fs/exec.c::exec_mmap(). mmap_sem is _not_ needed here. We are not copying the mm - we are creating new one (exec drops all mappings). For $DEITY sake, stop applying band-aids.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/