[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>
This commit is contained in:
committed by
Linus Torvalds
parent
41f2148a67
commit
e0877f07e8
@@ -96,8 +96,8 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
||||
|
||||
current->thread.request.u.thread.proc = fn;
|
||||
current->thread.request.u.thread.arg = arg;
|
||||
pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0, NULL, 0, NULL,
|
||||
NULL);
|
||||
pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0,
|
||||
¤t->thread.regs, 0, NULL, NULL);
|
||||
if(pid < 0)
|
||||
panic("do_fork failed in kernel_thread, errno = %d", pid);
|
||||
return(pid);
|
||||
|
||||
Reference in New Issue
Block a user