diff options
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 605eff9a8ac0..3ba155d24884 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <asm/idle.h> | 60 | #include <asm/idle.h> |
61 | #include <asm/syscalls.h> | 61 | #include <asm/syscalls.h> |
62 | #include <asm/smp.h> | 62 | #include <asm/smp.h> |
63 | #include <asm/ds.h> | ||
63 | 64 | ||
64 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); | 65 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); |
65 | 66 | ||
@@ -251,17 +252,8 @@ void exit_thread(void) | |||
251 | tss->x86_tss.io_bitmap_base = INVALID_IO_BITMAP_OFFSET; | 252 | tss->x86_tss.io_bitmap_base = INVALID_IO_BITMAP_OFFSET; |
252 | put_cpu(); | 253 | put_cpu(); |
253 | } | 254 | } |
254 | #ifdef CONFIG_X86_DS | 255 | |
255 | /* Free any BTS tracers that have not been properly released. */ | 256 | ds_exit_thread(current); |
256 | if (unlikely(current->bts)) { | ||
257 | ds_release_bts(current->bts); | ||
258 | current->bts = NULL; | ||
259 | |||
260 | kfree(current->bts_buffer); | ||
261 | current->bts_buffer = NULL; | ||
262 | current->bts_size = 0; | ||
263 | } | ||
264 | #endif /* CONFIG_X86_DS */ | ||
265 | } | 257 | } |
266 | 258 | ||
267 | void flush_thread(void) | 259 | void flush_thread(void) |
@@ -343,6 +335,12 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
343 | kfree(p->thread.io_bitmap_ptr); | 335 | kfree(p->thread.io_bitmap_ptr); |
344 | p->thread.io_bitmap_max = 0; | 336 | p->thread.io_bitmap_max = 0; |
345 | } | 337 | } |
338 | |||
339 | ds_copy_thread(p, current); | ||
340 | |||
341 | clear_tsk_thread_flag(p, TIF_DEBUGCTLMSR); | ||
342 | p->thread.debugctlmsr = 0; | ||
343 | |||
346 | return err; | 344 | return err; |
347 | } | 345 | } |
348 | 346 | ||