[PATCH] uml: add arch_switch_to for newly forked thread
Newly forked threads have no arch_switch_to_skas() called before their first run, because when schedule() switches to them they're resumed in the body of thread_wait() inside fork_handler() rather than in switch_threads() in switch_to_skas(). Compensate this missing call. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> 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
dd77aec07a
commit
54d8d3b5a0
@ -23,7 +23,14 @@ void arch_switch_to_tt(struct task_struct *from, struct task_struct *to)
|
||||
|
||||
void arch_switch_to_skas(struct task_struct *from, struct task_struct *to)
|
||||
{
|
||||
arch_switch_tls_skas(from, to);
|
||||
int err = arch_switch_tls_skas(from, to);
|
||||
if (!err)
|
||||
return;
|
||||
|
||||
if (err != -EINVAL)
|
||||
printk(KERN_WARNING "arch_switch_tls_skas failed, errno %d, not EINVAL\n", -err);
|
||||
else
|
||||
printk(KERN_WARNING "arch_switch_tls_skas failed, errno = EINVAL\n");
|
||||
}
|
||||
|
||||
int is_syscall(unsigned long addr)
|
||||
|
Reference in New Issue
Block a user