From 751497124beb0c41c7f88ee044d159406f7d6ade Mon Sep 17 00:00:00 2001 From: Alexander Aksenov Date: Wed, 30 Nov 2016 13:04:17 +0300 Subject: [PATCH] Fix aggrigated uprobes handling Issue: When aggrigated uprobe is executed, it never correctly returns from trampoline_uprobe_handler's retprobe_instance list iteration if it was called inside anther profiled function. Solution: It happened, because break condition was never satisfied: first time because orig_ret_addr == tramp_addr, all other times because p, which is pointer to the first uprobe, is not equal to up, which is other probes related uprobe. So, this fix removes p and up comparsion as a mistake. Change-Id: I9979b1fc113c7c0f204a8d20e69dd4bce30127cd Signed-off-by: Alexander Aksenov --- uprobe/swap_uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uprobe/swap_uprobes.c b/uprobe/swap_uprobes.c index dfe6523..f9c0ff0 100644 --- a/uprobe/swap_uprobes.c +++ b/uprobe/swap_uprobes.c @@ -726,7 +726,7 @@ int trampoline_uprobe_handler(struct uprobe *p, struct pt_regs *regs) orig_ret_addr = (unsigned long)ri->ret_addr; recycle_urp_inst(ri); - if ((orig_ret_addr != tramp_addr && up == p) || up == NULL) { + if (orig_ret_addr != tramp_addr || up == NULL) { /* * This is the real return address. Any other * instances associated with this task are for -- 2.7.4