 #ifdef CONFIG_CHECKING { unsigned long gs; struct x8664_pda *pda = cpu_pda + safe_smp_processor_id(); rdmsrl(MSR_GS_BASE, gs); if (gs != (unsigned long)pda) { wrmsrl(MSR_GS_BASE, pda); oops_in_progress++; printk("general protection handler: wrong gs %lx expected %p\n", gs, pda); oops_in_progress--; } } #endif 
asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,						long error_code){	conditional_sti(regs);#ifdef CONFIG_CHECKING       {                unsigned long gs;                struct x8664_pda *pda = cpu_pda + safe_smp_processor_id();                rdmsrl(MSR_GS_BASE, gs);                if (gs != (unsigned long)pda) {                        wrmsrl(MSR_GS_BASE, pda); 		       oops_in_progress++;                       printk("general protection handler: wrong gs %lx expected %p\n", gs, pda);		       oops_in_progress--;               }       }#endif	if (user_mode(regs)) {		struct task_struct *tsk = current;		if (exception_trace && unhandled_signal(tsk, SIGSEGV))			printk(KERN_INFO		       "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n",			       tsk->comm, tsk->pid,			       regs->rip,regs->rsp,error_code); 		tsk->thread.error_code = error_code;		tsk->thread.trap_no = 13;		force_sig(SIGSEGV, tsk);		return;	} 	/* kernel gp */	{		const struct exception_table_entry *fixup;		fixup = search_exception_tables(regs->rip);		if (fixup) {			regs->rip = fixup->fixup;			return;		}		if (notify_die(DIE_GPF, "general protection fault", regs,					error_code, 13, SIGSEGV) == NOTIFY_STOP)			return;		die("general protection fault", regs, error_code);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9e43e1b7c7c9872da032442d8e4bb112a02d16f4/traps.c/buggy/arch/x86_64/kernel/traps.c