
From: Jeff Dike <jdike@addtoit.com>

Fix a race where signals could be handled to the parent of a new process on
the kernel stack of the child, corrupting that stack, and crashing UML when
the next first runs.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/kernel/skas/process.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/um/kernel/skas/process.c~uml-fix-a-stack-corruption-crash arch/um/kernel/skas/process.c
--- 25/arch/um/kernel/skas/process.c~uml-fix-a-stack-corruption-crash	2005-01-16 23:28:02.900089368 -0800
+++ 25-akpm/arch/um/kernel/skas/process.c	2005-01-16 23:28:02.904088760 -0800
@@ -224,9 +224,10 @@ void new_thread(void *stack, void **swit
 	block_signals();
 	if(sigsetjmp(fork_buf, 1) == 0)
 		new_thread_proc(stack, handler);
-	set_signals(flags);
 
 	remove_sigstack();
+
+	set_signals(flags);
 }
 
 void thread_wait(void *sw, void *fb)
_
