|
|
aea179 |
commit a477a43122609691ce6ef24f71114cfaa9790392
|
|
|
aea179 |
Author: David Smith <dsmith@redhat.com>
|
|
|
aea179 |
Date: Fri Mar 17 10:44:12 2017 -0500
|
|
|
aea179 |
|
|
|
aea179 |
PR21255: Fix missing __set_task_state() definition.
|
|
|
aea179 |
|
|
|
aea179 |
* runtime/stp_utrace.c: Fix missing __set_task_state() definition. If we
|
|
|
aea179 |
can't find a __set_task_state() definition, define our own.
|
|
|
aea179 |
|
|
|
aea179 |
diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c
|
|
|
aea179 |
index bb2d663..5924016 100644
|
|
|
aea179 |
--- a/runtime/stp_utrace.c
|
|
|
aea179 |
+++ b/runtime/stp_utrace.c
|
|
|
aea179 |
@@ -29,6 +29,14 @@
|
|
|
aea179 |
|
|
|
aea179 |
#include "stp_helper_lock.h"
|
|
|
aea179 |
|
|
|
aea179 |
+#if defined(__set_task_state)
|
|
|
aea179 |
+#define __stp_set_task_state(tsk, state_value) \
|
|
|
aea179 |
+ __set_task_state((tsk), (state_value))
|
|
|
aea179 |
+#else
|
|
|
aea179 |
+#define __stp_set_task_state(tsk, state_value) \
|
|
|
aea179 |
+ do { (tsk)->state = (state_value); } while (0)
|
|
|
aea179 |
+#endif
|
|
|
aea179 |
+
|
|
|
aea179 |
/*
|
|
|
aea179 |
* Per-thread structure private to utrace implementation.
|
|
|
aea179 |
* If task_struct.utrace_flags is nonzero, task_struct.utrace
|
|
|
aea179 |
@@ -1105,7 +1113,7 @@ static bool utrace_do_stop(struct task_struct *target, struct utrace *utrace)
|
|
|
aea179 |
*/
|
|
|
aea179 |
spin_lock_irq(&target->sighand->siglock);
|
|
|
aea179 |
if (likely(task_is_stopped(target)))
|
|
|
aea179 |
- __set_task_state(target, TASK_TRACED);
|
|
|
aea179 |
+ __stp_set_task_state(target, TASK_TRACED);
|
|
|
aea179 |
spin_unlock_irq(&target->sighand->siglock);
|
|
|
aea179 |
} else if (utrace->resume > UTRACE_REPORT) {
|
|
|
aea179 |
utrace->resume = UTRACE_REPORT;
|