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 <[email protected]>
Index: 2.6.10/arch/um/kernel/skas/process.c
===================================================================
--- 2.6.10.orig/arch/um/kernel/skas/process.c 2005-01-16 20:37:25.000000000 -0500
+++ 2.6.10/arch/um/kernel/skas/process.c 2005-01-16 20:57:16.000000000 -0500
@@ -224,9 +224,10 @@
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)