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/kernel/syscall_kern.c | |
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/kernel/syscall_kern.c')
-rw-r--r-- | arch/um/kernel/syscall_kern.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/um/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c index b7a55251e897..8e1a3501ff46 100644 --- a/arch/um/kernel/syscall_kern.c +++ b/arch/um/kernel/syscall_kern.c | |||
@@ -31,7 +31,8 @@ long sys_fork(void) | |||
31 | long ret; | 31 | long ret; |
32 | 32 | ||
33 | current->thread.forking = 1; | 33 | current->thread.forking = 1; |
34 | ret = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL); | 34 | ret = do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), |
35 | ¤t->thread.regs, 0, NULL, NULL); | ||
35 | current->thread.forking = 0; | 36 | current->thread.forking = 0; |
36 | return(ret); | 37 | return(ret); |
37 | } | 38 | } |
@@ -41,8 +42,9 @@ long sys_vfork(void) | |||
41 | long ret; | 42 | long ret; |
42 | 43 | ||
43 | current->thread.forking = 1; | 44 | current->thread.forking = 1; |
44 | ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL, | 45 | ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, |
45 | NULL); | 46 | UPT_SP(¤t->thread.regs.regs), |
47 | ¤t->thread.regs, 0, NULL, NULL); | ||
46 | current->thread.forking = 0; | 48 | current->thread.forking = 0; |
47 | return(ret); | 49 | return(ret); |
48 | } | 50 | } |
@@ -162,14 +164,3 @@ int next_syscall_index(int limit) | |||
162 | spin_unlock(&syscall_lock); | 164 | spin_unlock(&syscall_lock); |
163 | return(ret); | 165 | return(ret); |
164 | } | 166 | } |
165 | |||
166 | /* | ||
167 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
168 | * Emacs will notice this stuff at the end of the file and automatically | ||
169 | * adjust the settings for this buffer only. This must remain at the end | ||
170 | * of the file. | ||
171 | * --------------------------------------------------------------------------- | ||
172 | * Local variables: | ||
173 | * c-file-style: "linux" | ||
174 | * End: | ||
175 | */ | ||