aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/process.c')
-rw-r--r--arch/x86_64/kernel/process.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index cbbc6adc1a92..d8d5ccc245c8 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -382,14 +382,17 @@ void exit_thread(void)
382void flush_thread(void) 382void flush_thread(void)
383{ 383{
384 struct task_struct *tsk = current; 384 struct task_struct *tsk = current;
385 struct thread_info *t = current_thread_info();
386 385
387 if (t->flags & _TIF_ABI_PENDING) { 386 if (test_tsk_thread_flag(tsk, TIF_ABI_PENDING)) {
388 t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); 387 clear_tsk_thread_flag(tsk, TIF_ABI_PENDING);
389 if (t->flags & _TIF_IA32) 388 if (test_tsk_thread_flag(tsk, TIF_IA32)) {
389 clear_tsk_thread_flag(tsk, TIF_IA32);
390 } else {
391 set_tsk_thread_flag(tsk, TIF_IA32);
390 current_thread_info()->status |= TS_COMPAT; 392 current_thread_info()->status |= TS_COMPAT;
393 }
391 } 394 }
392 t->flags &= ~_TIF_DEBUG; 395 clear_tsk_thread_flag(tsk, TIF_DEBUG);
393 396
394 tsk->thread.debugreg0 = 0; 397 tsk->thread.debugreg0 = 0;
395 tsk->thread.debugreg1 = 0; 398 tsk->thread.debugreg1 = 0;