Skip to contentSkip to conversation

UML - Fix a stack corruption crash

PATCH In review Jeff Dike 1 participant 1 message Jan 17, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 9/10 UML - Fix a stack corruption crash

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.

arch/um/kernel/skas/process.c +2 -1
Index: 2.6.10/arch/um/kernel/skas/process.c
===================================================================
@@ -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)