|
@@ -138,6 +138,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
|
|
|
|
|
p->thread.sp = (unsigned long) childregs;
|
|
|
p->thread.sp0 = (unsigned long) (childregs+1);
|
|
|
+ memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
|
|
|
|
|
|
if (unlikely(p->flags & PF_KTHREAD)) {
|
|
|
/* kernel thread */
|
|
@@ -152,9 +153,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
|
|
childregs->orig_ax = -1;
|
|
|
childregs->cs = __KERNEL_CS | get_kernel_rpl();
|
|
|
childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_FIXED;
|
|
|
- p->thread.fpu_counter = 0;
|
|
|
p->thread.io_bitmap_ptr = NULL;
|
|
|
- memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
|
|
|
return 0;
|
|
|
}
|
|
|
*childregs = *current_pt_regs();
|
|
@@ -165,13 +164,10 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
|
|
|
p->thread.ip = (unsigned long) ret_from_fork;
|
|
|
task_user_gs(p) = get_user_gs(current_pt_regs());
|
|
|
|
|
|
- p->thread.fpu_counter = 0;
|
|
|
p->thread.io_bitmap_ptr = NULL;
|
|
|
tsk = current;
|
|
|
err = -ENOMEM;
|
|
|
|
|
|
- memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
|
|
|
-
|
|
|
if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) {
|
|
|
p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr,
|
|
|
IO_BITMAP_BYTES, GFP_KERNEL);
|