summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ChangeLog5
-rw-r--r--runtime/task_finder.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 8ef5550f..373cbc16 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-09 David Smith <dsmith@redhat.com>
+
+ * task_finder.c (__stp_utrace_task_finder_report_exec): Handles
+ 2.6.25 kernels.
+
2008-06-06 David Smith <dsmith@redhat.com>
* task_finder.c: Added some debug logic. Use
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index e233d463..9c8acfa0 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -418,10 +418,14 @@ __stp_utrace_task_finder_report_exec(struct utrace_attached_engine *engine,
// '/bin/bash' clones and then execs '/bin/ls'. If the user
// was probing '/bin/bash', the cloned thread is still
// '/bin/bash' up until the exec.
- if (tsk != NULL && tsk->parent != NULL && tsk->parent->pid > 1) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+#define real_parent parent
+#endif
+ if (tsk != NULL && tsk->real_parent != NULL
+ && tsk->real_parent->pid > 1) {
// We'll hardcode this as a process end, but a thread
// *could* call exec (although they aren't supposed to).
- __stp_utrace_attach_match_tsk(tsk->parent, tsk, 0, 1);
+ __stp_utrace_attach_match_tsk(tsk->real_parent, tsk, 0, 1);
}
// On exec, check bprm