From b0b1def3b7202ba92440feee91498989f92cf582 Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 10 Jul 2014 09:23:12 -0500 Subject: [PATCH] Update fix for PR17127 by correctly handling TASK_INTERRUPTIBLE flag. * runtime/linux/task_finder2.c (stap_task_finder_post_init): The 'state' field of the task structure contains a bitfield, not a singular value. Properly test for TASK_INTERRUPTIBLE. --- runtime/linux/task_finder2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/linux/task_finder2.c b/runtime/linux/task_finder2.c index f6dd9a52c..845aec5bc 100644 --- a/runtime/linux/task_finder2.c +++ b/runtime/linux/task_finder2.c @@ -1803,7 +1803,7 @@ stap_task_finder_post_init(void) if (engine != NULL && !IS_ERR(engine)) { /* Only try to interrupt tasks in the * TASK_INTERRUPTIBLE state. */ - if (tsk->state == TASK_INTERRUPTIBLE) { + if (tsk->state & TASK_INTERRUPTIBLE) { /* We found a target task. Stop it. */ int rc = utrace_control(tsk, engine, UTRACE_INTERRUPT); -- 2.43.5