summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/syscall_kern.c
diff options
context:
space:
mode:
authorJeff Dike2005-06-25 23:55:21 +0200
committerLinus Torvalds2005-06-26 01:24:35 +0200
commite0877f07e85a46e4fde32bd84f08551d360839fe (patch)
tree97e29c30e5f1ee7f06f5cdd4760291d3bba6640e /arch/um/kernel/syscall_kern.c
parent[PATCH] uml: kfree cleanup (diff)
downloadkernel-qcow2-linux-e0877f07e85a46e4fde32bd84f08551d360839fe.tar.gz
kernel-qcow2-linux-e0877f07e85a46e4fde32bd84f08551d360839fe.tar.xz
kernel-qcow2-linux-e0877f07e85a46e4fde32bd84f08551d360839fe.zip
[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.c19
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)
long ret;
current->thread.forking = 1;
- ret = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL);
+ ret = do_fork(SIGCHLD, UPT_SP(&current->thread.regs.regs),
+ &current->thread.regs, 0, NULL, NULL);
current->thread.forking = 0;
return(ret);
}
@@ -41,8 +42,9 @@ long sys_vfork(void)
long ret;
current->thread.forking = 1;
- ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL,
- NULL);
+ ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
+ UPT_SP(&current->thread.regs.regs),
+ &current->thread.regs, 0, NULL, NULL);
current->thread.forking = 0;
return(ret);
}
@@ -162,14 +164,3 @@ int next_syscall_index(int limit)
spin_unlock(&syscall_lock);
return(ret);
}
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only. This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */