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-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.
enum utrace_resume_action action)
{
struct utrace_attached_engine *engine;
-#ifndef PF_KTHREAD
struct mm_struct *mm;
-#endif
int rc = 0;
// Ignore init
// 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)) {