x86/fpu: Use task_disable_lazy_fpu_restore() helper
Replace magic assignments of fpu.last_cpu = ~0 with more explicit task_disable_lazy_fpu_restore() calls. Signed-off-by: Rik van Riel <riel@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1423252925-14451-8-git-send-email-riel@redhat.com Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:

committed by
Borislav Petkov

parent
1361ef29c7
commit
6a5fe8952b
@@ -68,8 +68,8 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||
|
||||
dst->thread.fpu_counter = 0;
|
||||
dst->thread.fpu.has_fpu = 0;
|
||||
dst->thread.fpu.last_cpu = ~0;
|
||||
dst->thread.fpu.state = NULL;
|
||||
task_disable_lazy_fpu_restore(dst);
|
||||
if (tsk_used_math(src)) {
|
||||
int err = fpu_alloc(&dst->thread.fpu);
|
||||
if (err)
|
||||
|
Reference in New Issue
Block a user