Fix aggrigated uprobes handling accepted/tizen/3.0/common/20161201.135356 accepted/tizen/3.0/mobile/20161201.074722 accepted/tizen/3.0/tv/20161201.074728 accepted/tizen/3.0/wearable/20161201.074735 submit/tizen_3.0/20161130.194014
authorAlexander Aksenov <a.aksenov@samsung.com>
Wed, 30 Nov 2016 10:04:17 +0000 (13:04 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Wed, 30 Nov 2016 11:22:38 +0000 (14:22 +0300)
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 <a.aksenov@samsung.com>
uprobe/swap_uprobes.c

index dfe6523..f9c0ff0 100644 (file)
@@ -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