summaryrefslogtreecommitdiffstats
path: root/runtime/task_finder.c
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2008-07-01 15:16:52 -0500
committerDavid Smith <dsmith@redhat.com>2008-07-01 15:16:52 -0500
commitb77e6d1fc44f553e8d3ee7ec3b7e6076ad86fed6 (patch)
tree50b5f946c20bdf6f9cba6f9dd3500431a59f93b7 /runtime/task_finder.c
parentc0e526f077ee8cf6b1d62e02822b722d946d2648 (diff)
downloadsystemtap-steved-b77e6d1fc44f553e8d3ee7ec3b7e6076ad86fed6.tar.gz
systemtap-steved-b77e6d1fc44f553e8d3ee7ec3b7e6076ad86fed6.tar.xz
systemtap-steved-b77e6d1fc44f553e8d3ee7ec3b7e6076ad86fed6.zip
Fixed __stp_get_mm_path() error return code.
2008-07-01 David Smith <dsmith@redhat.com> * task_finder.c (__stp_get_mm_path): Corrected error return code. (__stp_utrace_attach_match_tsk): Ignores ENOENT error from __stp_get_mm_path(). (stap_start_task_finder): Ditto.
Diffstat (limited to 'runtime/task_finder.c')
-rw-r--r--runtime/task_finder.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 021144dc..316a9bc0 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -249,7 +249,7 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen)
}
else {
*buf = '\0';
- rc = ERR_PTR(ENOENT);
+ rc = ERR_PTR(-ENOENT);
}
up_read(&mm->mmap_sem);
return rc;
@@ -428,8 +428,9 @@ __stp_utrace_attach_match_tsk(struct task_struct *path_tsk,
mmput(mm); /* We're done with mm */
if (mmpath == NULL || IS_ERR(mmpath)) {
int rc = -PTR_ERR(mmpath);
- _stp_error("Unable to get path (error %d) for pid %d",
- rc, (int)path_tsk->pid);
+ if (rc != ENOENT)
+ _stp_error("Unable to get path (error %d) for pid %d",
+ rc, (int)path_tsk->pid);
}
else {
__stp_utrace_attach_match_filename(match_tsk, mmpath,
@@ -952,9 +953,14 @@ stap_start_task_finder(void)
mmput(mm); /* We're done with mm */
if (mmpath == NULL || IS_ERR(mmpath)) {
rc = -PTR_ERR(mmpath);
- _stp_error("Unable to get path (error %d) for pid %d",
- rc, (int)tsk->pid);
- goto stf_err;
+ if (rc == ENOENT) {
+ continue;
+ }
+ else {
+ _stp_error("Unable to get path (error %d) for pid %d",
+ rc, (int)tsk->pid);
+ goto stf_err;
+ }
}
/* Check the thread's exe's path/pid against our list. */