On top of your patch in
https://www.redhat.com/archives/utrace-devel/2009-November/msg00109.html

I attached this patch below just in case. As expected, it fixes
the problem with the lost TIF_SINGLESTEP.

Oleg.

--- UTRACE-PTRACE/kernel/utrace.c~__ROLAND_RESUME_FIX   2009-11-18 
21:16:23.000000000 +0100
+++ UTRACE-PTRACE/kernel/utrace.c       2009-11-19 02:17:26.000000000 +0100
@@ -1882,8 +1882,18 @@ void utrace_resume(struct task_struct *t
         */
        report.action = start_report(utrace);
 
-       if (report.action == UTRACE_REPORT &&
-           likely(task->utrace_flags & UTRACE_EVENT(QUIESCE))) {
+       switch (report.action) {
+       case UTRACE_RESUME:
+               /*
+                * Anything we might have done was already handled by
+                * utrace_get_signal(), or this is an entirely spurious
+                * call.  (The arch might use TIF_NOTIFY_RESUME for other
+                * purposes as well as calling us.)
+                */
+               return;
+       case UTRACE_REPORT:
+               if (unlikely(!(task->utrace_flags & UTRACE_EVENT(QUIESCE))))
+                       break;
                /*
                 * Do a simple reporting pass, with no specific
                 * callback after report_quiesce.
@@ -1891,13 +1901,15 @@ void utrace_resume(struct task_struct *t
                report.action = UTRACE_RESUME;
                list_for_each_entry(engine, &utrace->attached, entry)
                        start_callback(utrace, &report, engine, task, 0);
-       } else {
+               break;
+       default:
                /*
                 * Even if this report was truly spurious, there is no need
                 * for utrace_reset() now.  TIF_NOTIFY_RESUME was already
                 * cleared--it doesn't stay spuriously set.
                 */
                report.spurious = false;
+               break;
        }
 
        /*

Reply via email to