KVM: Initialize fpu state in preemptible context
init_fpu() (which is indirectly called by the fpu switching code) assumes it is in process context. Rather than makeing init_fpu() use an atomic allocation, which can cause a task to be killed, make sure the fpu is already initialized when we enter the run loop. KVM-Stable-Tag. Reported-and-tested-by: Kirill A. Shutemov <kas@openvz.org> Acked-by: Pekka Enberg <penberg@kernel.org> Reviewed-by: Christoph Lameter <cl@linux.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
@@ -169,6 +169,7 @@ int init_fpu(struct task_struct *tsk)
|
||||
set_stopped_child_used_math(tsk);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(init_fpu);
|
||||
|
||||
/*
|
||||
* The xstateregs_active() routine is the same as the fpregs_active() routine,
|
||||
|
Reference in New Issue
Block a user