disarm_kprobe(p, regs);
arch_disarm_kprobe(p); regs->tpc = (unsigned long) p->addr; regs->tnpc = current_kprobe_orig_tnpc; regs->tstate = ((regs->tstate & ~TSTATE_PIL) | current_kprobe_orig_tstate_pil);
static int kprobe_handler(struct pt_regs *regs){	struct kprobe *p;	void *addr = (void *) regs->tpc;	int ret = 0;	preempt_disable();	if (kprobe_running()) {		/* We *are* holding lock here, so this is safe.		 * Disarm the probe we just hit, and ignore it.		 */		p = get_kprobe(addr);		if (p) {			if (kprobe_status == KPROBE_HIT_SS) {				regs->tstate = ((regs->tstate & ~TSTATE_PIL) |					current_kprobe_orig_tstate_pil);				unlock_kprobes();				goto no_kprobe;			}			disarm_kprobe(p, regs);			ret = 1;		} else {			p = current_kprobe;			if (p->break_handler && p->break_handler(p, regs))				goto ss_probe;		}		/* If it's not ours, can't be delete race, (we hold lock). */		goto no_kprobe;	}	lock_kprobes();	p = get_kprobe(addr);	if (!p) {		unlock_kprobes();		if (*(u32 *)addr != BREAKPOINT_INSTRUCTION) {			/*			 * The breakpoint instruction was removed right			 * after we hit it.  Another cpu has removed			 * either a probepoint or a debugger breakpoint			 * at this address.  In either case, no further			 * handling of this interrupt is appropriate.			 */			ret = 1;		}		/* Not one of ours: let kernel handle it */		goto no_kprobe;	}	kprobe_status = KPROBE_HIT_ACTIVE;	current_kprobe = p;	if (p->pre_handler && p->pre_handler(p, regs))		return 1;ss_probe:	prepare_singlestep(p, regs);	kprobe_status = KPROBE_HIT_SS;	return 1;no_kprobe:	preempt_enable_no_resched();	return ret;}