<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/um/os-Linux/execvp.c, branch v3.5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/um/os-Linux/execvp.c?h=v3.5</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/um/os-Linux/execvp.c?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-11-25T21:28:34Z</updated>
<entry>
<title>[PATCH] uml: make execvp safe for our usage</title>
<updated>2006-11-25T21:28:34Z</updated>
<author>
<name>Paolo 'Blaisorblade' Giarrusso</name>
<email>blaisorblade@yahoo.it</email>
</author>
<published>2006-11-25T19:09:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5d48545e5e88ab7a27ba6a5cb1e8fff617754b61'/>
<id>urn:sha1:5d48545e5e88ab7a27ba6a5cb1e8fff617754b61</id>
<content type='text'>
Reimplement execvp for our purposes - after we call fork() it is fundamentally
unsafe to use the kernel allocator - current is not valid there.  So we simply
pass to our modified execvp() a preallocated buffer.  This fixes a real bug
and works very well in testing (I've seen indirectly warning messages from the
forked thread - they went on the pipe connected to its stdout and where read
as a number by UML, when calling read_output().  I verified the obtained
number corresponded to "BUG:").

The added use of __cant_sleep() is not a new bug since __cant_sleep() is
already used in the same function - passing an atomicity parameter would be
better but it would require huge change, stating that this function must not
be called in atomic context and can sleep is a better idea (will make sure of
this gradually).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
