summaryrefslogtreecommitdiffstats
path: root/runtime/task_finder.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/task_finder.c')
-rw-r--r--runtime/task_finder.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 1832c795..541e5a04 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -1,5 +1,15 @@
+#ifndef TASK_FINDER_C
+#define TASK_FINDER_C
+
+#if ! defined(CONFIG_UTRACE)
+#error "Need CONFIG_UTRACE!"
+#endif
+
+#include <linux/utrace.h>
#include <linux/list.h>
#include <linux/binfmts.h>
+#include <linux/mount.h>
+
#include "syscall.h"
#include "task_finder_vma.c"
@@ -583,7 +593,7 @@ __stp_utrace_task_finder_target_death(struct utrace_attached_engine *engine,
// Call the callback
rc = tgt->callback(tsk, 0,
- (atomic_read(&tsk->signal->live) == 0),
+ (tsk->signal == NULL) || (atomic_read(&tsk->signal->live) == 0),
tgt);
if (rc != 0) {
_stp_error("death callback for %d failed: %d",
@@ -961,6 +971,7 @@ stap_start_task_finder(void)
struct task_struct *grp, *tsk;
char *mmpath_buf;
+ debug_task_finder_report();
mmpath_buf = _stp_kmalloc(PATH_MAX);
if (mmpath_buf == NULL) {
_stp_error("Unable to allocate space for path");
@@ -1080,3 +1091,6 @@ stap_stop_task_finder(void)
debug_task_finder_report();
atomic_set(&__stp_task_finder_state, __STP_TF_STOPPED);
}
+
+
+#endif /* TASK_FINDER_C */