aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-06-25 17:55:21 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:35 -0400
commite0877f07e85a46e4fde32bd84f08551d360839fe (patch)
tree97e29c30e5f1ee7f06f5cdd4760291d3bba6640e /arch/um/sys-x86_64
parent41f2148a67f28803d64bf5ff538591af90a5ab57 (diff)
[PATCH] uml: fork cleanup
Fix the do_fork calling convention: normal arch pass the regs and the new sp value to do_fork instead of NULL. Currently the arch-independent code ignores these values, while the UML code (actually it's copy_thread) gets the right values by itself. With this patch, things are fixed up. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r--arch/um/sys-x86_64/syscalls.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c
index 6f44f40204ed..3259a4db4534 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86_64/syscalls.c
@@ -174,26 +174,11 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp,
174{ 174{
175 long ret; 175 long ret;
176 176
177 /* XXX: normal arch do here this pass, and also pass the regs to 177 if (!newsp)
178 * do_fork, instead of NULL. Currently the arch-independent code 178 newsp = UPT_SP(&current->thread.regs.regs);
179 * ignores these values, while the UML code (actually it's
180 * copy_thread) does the right thing. But this should change,
181 probably. */
182 /*if (!newsp)
183 newsp = UPT_SP(current->thread.regs);*/
184 current->thread.forking = 1; 179 current->thread.forking = 1;
185 ret = do_fork(clone_flags, newsp, NULL, 0, parent_tid, child_tid); 180 ret = do_fork(clone_flags, newsp, &current->thread.regs, 0, parent_tid,
181 child_tid);
186 current->thread.forking = 0; 182 current->thread.forking = 0;
187 return(ret); 183 return(ret);
188} 184}
189
190/*
191 * Overrides for Emacs so that we follow Linus's tabbing style.
192 * Emacs will notice this stuff at the end of the file and automatically
193 * adjust the settings for this buffer only. This must remain at the end
194 * of the file.
195 * ---------------------------------------------------------------------------
196 * Local variables:
197 * c-file-style: "linux"
198 * End:
199 */