diff options
-rw-r--r-- | runtime/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/task_finder.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index df765169..2eb1cdaf 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2009-02-11 David Smith <dsmith@redhat.com> + + * task_finder.c (__stp_utrace_attach): Still checks for mm after + checking task's flags for PF_KTHREAD. + 2009-02-10 David Smith <dsmith@redhat.com> * task_finder.c (stap_utrace_detach_ops): Fixed typo. diff --git a/runtime/task_finder.c b/runtime/task_finder.c index e058c191..9db713c3 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -413,9 +413,7 @@ __stp_utrace_attach(struct task_struct *tsk, enum utrace_resume_action action) { struct utrace_attached_engine *engine; -#ifndef PF_KTHREAD struct mm_struct *mm; -#endif int rc = 0; // Ignore init @@ -426,13 +424,14 @@ __stp_utrace_attach(struct task_struct *tsk, // Ignore kernel threads if (tsk->flags & PF_KTHREAD) return EPERM; -#else - // Ignore threads with no mm (which are kernel threads). +#endif + + // Ignore threads with no mm (which are either kernel threads + // or "mortally wounded" threads). mm = get_task_mm(tsk); if (! mm) return EPERM; mmput(mm); -#endif engine = utrace_attach_task(tsk, UTRACE_ATTACH_CREATE, ops, data); if (IS_ERR(engine)) { |