[patch 5/5] [kprobes] Tweak to the function return probe design

Ananth N Mavinakayanahalli amavin at redhat.com
Tue Jun 14 05:48:15 EST 2005


rusty.lynch at intel.com wrote:

Hi Rusty,

Thanks for doing this. However...

> +
> +		orig_ret_address = (unsigned long)ri->ret_addr;
> +		recycle_rp_inst(ri);
> +
> +		if (orig_ret_address != (unsigned long) &kretprobe_trampoline)
> +			/*
> +			 * This is the real return address. Any other
> +			 * instances associated with this task are for
> +			 * other calls deeper on the call stack
> +			 */
> +			break;
> +	}
> +
> +	BUG_ON(!orig_ret_address);
> +	regs->nip = orig_ret_address;
> +
> +	unlock_kprobes();
> +	preempt_enable_no_resched();
         ^^^^^^^

We don't need this here - on ppc64, we do a preempt_disable/enable in
kprobe_exceptions_notify() and so this will cause a spurious 
preempt_enable().

Thanks,
Ananth



More information about the Linuxppc64-dev mailing list