asm("movl %%gs,%0" : "=m" (p->thread.gsindex)); asm("movl %%fs,%0" : "=m" (p->thread.fsindex)); asm("movl %%es,%0" : "=m" (p->thread.es)); asm("movl %%ds,%0" : "=m" (p->thread.ds)); 
asm("mov %%gs,%0" : "=m" (p->thread.gsindex)); asm("mov %%fs,%0" : "=m" (p->thread.fsindex)); asm("mov %%es,%0" : "=m" (p->thread.es)); asm("mov %%ds,%0" : "=m" (p->thread.ds)); 
int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp, 		unsigned long unused,	struct task_struct * p, struct pt_regs * regs){	int err;	struct pt_regs * childregs;	struct task_struct *me = current;	childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;	*childregs = *regs;	childregs->rax = 0;	childregs->rsp = rsp;	if (rsp == ~0UL) {		childregs->rsp = (unsigned long)childregs;	}	p->thread.rsp = (unsigned long) childregs;	p->thread.rsp0 = (unsigned long) (childregs+1);	p->thread.userrsp = me->thread.userrsp; 	set_ti_thread_flag(p->thread_info, TIF_FORK);	p->thread.fs = me->thread.fs;	p->thread.gs = me->thread.gs;	asm("movl %%gs,%0" : "=m" (p->thread.gsindex));	asm("movl %%fs,%0" : "=m" (p->thread.fsindex));	asm("movl %%es,%0" : "=m" (p->thread.es));	asm("movl %%ds,%0" : "=m" (p->thread.ds));	if (unlikely(me->thread.io_bitmap_ptr != NULL)) { 		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);		if (!p->thread.io_bitmap_ptr) {			p->thread.io_bitmap_max = 0;			return -ENOMEM;		}		memcpy(p->thread.io_bitmap_ptr, me->thread.io_bitmap_ptr, IO_BITMAP_BYTES);	} 	/*	 * Set a new TLS for the child thread?	 */	if (clone_flags & CLONE_SETTLS) {#ifdef CONFIG_IA32_EMULATION		if (test_thread_flag(TIF_IA32))			err = ia32_child_tls(p, childregs); 		else 			#endif	 			err = do_arch_prctl(p, ARCH_SET_FS, childregs->r8); 		if (err) 			goto out;	}	err = 0;out:	if (err && p->thread.io_bitmap_ptr) {		kfree(p->thread.io_bitmap_ptr);		p->thread.io_bitmap_max = 0;	}	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/fd51f666fa591294bd7462447512666e61c56ea0/process.c/buggy/arch/x86_64/kernel/process.c