Skip to content

Commit 2459ee8

Browse files
amlutoKAGA-KOKO
authored andcommitted
x86/vm86: Set thread.vm86 to NULL on fork/clone
thread.vm86 points to per-task information -- the pointer should not be copied on clone. Fixes: d4ce0f2 ("x86/vm86: Move fields from 'struct kernel_vm86_struct' to 'struct vm86'") Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Brian Gerst <brgerst@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Stas Sergeev <stsp@list.ru> Link: http://lkml.kernel.org/r/71c5d6985d70ec8197c8d72f003823c81b7dcf99.1446270067.git.luto@kernel.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 226f1f7 commit 2459ee8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kernel/process.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ EXPORT_SYMBOL_GPL(idle_notifier_unregister);
8484
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
8585
{
8686
memcpy(dst, src, arch_task_struct_size);
87+
#ifdef CONFIG_VM86
88+
dst->thread.vm86 = NULL;
89+
#endif
8790

8891
return fpu__copy(&dst->thread.fpu, &src->thread.fpu);
8992
}

0 commit comments

Comments
 (0)