We should never call finish_resume_report(report) when
report->action == UTRACE_RESUME, this can "destroy" the result
of the previous finish_resume_report().

Signed-off-by: Oleg Nesterov <o...@redhat.com>
---

 kernel/utrace.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- UTRACE-PTRACE/kernel/utrace.c~1_UGS_FIX_FINISH_RESUME_REPORT        
2009-11-19 02:17:26.000000000 +0100
+++ UTRACE-PTRACE/kernel/utrace.c       2009-11-19 02:24:41.000000000 +0100
@@ -2019,9 +2019,11 @@ int utrace_get_signal(struct task_struct
                         * We only got here to process utrace->resume.
                         * Despite no callbacks, this report is not spurious.
                         */
-                       report.action = resume;
-                       report.spurious = false;
-                       finish_resume_report(task, utrace, &report);
+                       if (resume != UTRACE_RESUME) {
+                               report.action = resume;
+                               report.spurious = false;
+                               finish_resume_report(task, utrace, &report);
+                       }
                        return -1;
                } else if (!(task->utrace_flags & UTRACE_EVENT(QUIESCE))) {
                        /*

Reply via email to