From e5a338c3a2aeb1d5dfa27f4d30dd04bfd8c61ce4 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 4 Oct 2010 15:46:38 -0500 Subject: [PATCH] Fixed BZ634242 for older kernels. * runtime/uprobes/uprobes.c (uprobe_report_clone): If two processes are are sharing the same memory space (CLONE_VM) don't remove probes, since that will remove the probes from both processes. --- runtime/uprobes/uprobes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/uprobes/uprobes.c b/runtime/uprobes/uprobes.c index 403de189d..3eb8ea902 100644 --- a/runtime/uprobes/uprobes.c +++ b/runtime/uprobes/uprobes.c @@ -2280,8 +2280,9 @@ static u32 uprobe_report_clone(struct utrace_attached_engine *engine, down_write(&uproc->rwsem); get_task_struct(child); - if (clone_flags & CLONE_THREAD) { - /* New thread in the same process */ + if (clone_flags & (CLONE_THREAD|CLONE_VM)) { + /* New thread in the same process (CLONE_THREAD) or + * processes sharing the same memory space (CLONE_VM). */ ctask = uprobe_add_task(child, uproc); BUG_ON(!ctask); if (IS_ERR(ctask)) -- 2.43.5