From: Atsushi Tsuji <a-tsuji@bk.jp.nec.com>
To: systemtap ML <systemtap@sources.redhat.com>
Subject: [PATCH] Fix error checking in utrace_attach_task()
Date: Thu, 02 Jun 2011 00:43:00 -0000 [thread overview]
Message-ID: <4DE6DB70.30109@bk.jp.nec.com> (raw)
utrace_attach_task() returns not ENOENT but ESRCH in case of
UTRACE_ATTACH_CREATE if an error occurs. So this patch fixes
error checking to correctly ignore processes in "mortally
wounded" state.
Signed-off-by: Atsushi Tsuji <a-tsuji@bk.jp.nec.com>
---
runtime/task_finder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index 2c52175..552972b 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -506,7 +506,7 @@ __stp_utrace_attach(struct task_struct *tsk,
engine = utrace_attach_task(tsk, UTRACE_ATTACH_CREATE, ops, data);
if (IS_ERR(engine)) {
int error = -PTR_ERR(engine);
- if (error != ENOENT) {
+ if (error != ESRCH) {
_stp_error("utrace_attach returned error %d on pid %d",
error, (int)tsk->pid);
rc = error;
-- 1.7.2.1
next reply other threads:[~2011-06-02 0:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 0:43 Atsushi Tsuji [this message]
2011-06-02 11:24 ` Frank Ch. Eigler
2011-06-02 16:28 ` David Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DE6DB70.30109@bk.jp.nec.com \
--to=a-tsuji@bk.jp.nec.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).