From: Andi Kleen Date: Mon, 26 Jun 2006 11:57:19 +0000 (+0200) Subject: [PATCH] x86_64: Make sure is_compat_task works early X-Git-Tag: v2.6.18-rc1~612^2~56 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4d9bc79cd28b779610d9590b3a96a28a0f64a25a;p=linux-2.6-omap-h63xx.git [PATCH] x86_64: Make sure is_compat_task works early Previously it would only work in the first 32bit system call, not during early process setup. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 52c03f6c773..dcb77b46234 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -364,8 +364,11 @@ void flush_thread(void) struct task_struct *tsk = current; struct thread_info *t = current_thread_info(); - if (t->flags & _TIF_ABI_PENDING) + if (t->flags & _TIF_ABI_PENDING) { t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); + if (t->flags & _TIF_IA32) + current_thread_info()->status |= TS_COMPAT; + } tsk->thread.debugreg0 = 0; tsk->thread.debugreg1 = 0;