diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-06-25 17:55:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:35 -0400 |
commit | e0877f07e85a46e4fde32bd84f08551d360839fe (patch) | |
tree | 97e29c30e5f1ee7f06f5cdd4760291d3bba6640e /arch/um/sys-i386 | |
parent | 41f2148a67f28803d64bf5ff538591af90a5ab57 (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-i386')
-rw-r--r-- | arch/um/sys-i386/syscalls.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-i386/syscalls.c index 335e2d89504..83e9be820a8 100644 --- a/arch/um/sys-i386/syscalls.c +++ b/arch/um/sys-i386/syscalls.c | |||
@@ -69,15 +69,11 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
69 | { | 69 | { |
70 | long ret; | 70 | long ret; |
71 | 71 | ||
72 | /* XXX: normal arch do here this pass, and also pass the regs to | 72 | if (!newsp) |
73 | * do_fork, instead of NULL. Currently the arch-independent code | 73 | newsp = UPT_SP(¤t->thread.regs.regs); |
74 | * ignores these values, while the UML code (actually it's | ||
75 | * copy_thread) does the right thing. But this should change, | ||
76 | probably. */ | ||
77 | /*if (!newsp) | ||
78 | newsp = UPT_SP(current->thread.regs);*/ | ||
79 | current->thread.forking = 1; | 74 | current->thread.forking = 1; |
80 | ret = do_fork(clone_flags, newsp, NULL, 0, parent_tid, child_tid); | 75 | ret = do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, |
76 | child_tid); | ||
81 | current->thread.forking = 0; | 77 | current->thread.forking = 0; |
82 | return(ret); | 78 | return(ret); |
83 | } | 79 | } |
@@ -197,14 +193,3 @@ long sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
197 | 193 | ||
198 | return ret; | 194 | return ret; |
199 | } | 195 | } |
200 | |||
201 | /* | ||
202 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
203 | * Emacs will notice this stuff at the end of the file and automatically | ||
204 | * adjust the settings for this buffer only. This must remain at the end | ||
205 | * of the file. | ||
206 | * --------------------------------------------------------------------------- | ||
207 | * Local variables: | ||
208 | * c-file-style: "linux" | ||
209 | * End: | ||
210 | */ | ||