Fix __must_check warnings. The change in ptrace_wake_up() just fools
the compiler, we really don't care if utrace_control() fails or returns
something like -EINPROGRESS. But we could add a "clever" WARN_ON(err..)
perhaps.

---

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

--- UTRACE-PTRACE/kernel/ptrace-utrace.c~142_MUST_CHECK 2009-12-05 
16:16:15.000000000 +0100
+++ UTRACE-PTRACE/kernel/ptrace-utrace.c        2009-12-05 16:48:48.000000000 
+0100
@@ -216,7 +216,7 @@ static int ptrace_attach_task(struct tas
        return 0;
 }
 
-static void ptrace_wake_up(struct task_struct *tracee,
+static int ptrace_wake_up(struct task_struct *tracee,
                                struct utrace_engine *engine,
                                enum utrace_resume_action action,
                                bool force_wakeup)
@@ -236,7 +236,8 @@ static void ptrace_wake_up(struct task_s
 
        if (action != UTRACE_REPORT)
                ptrace_context(engine)->stop_code = 0;
-       utrace_control(tracee, engine, action);
+
+       return utrace_control(tracee, engine, action);
 }
 
 static void ptrace_detach_task(struct task_struct *tracee, int sig)
@@ -556,7 +557,8 @@ static u32 ptrace_report_signal(u32 acti
         * Make sure the subsequent UTRACE_SIGNAL_REPORT clears
         * ->siginfo before return from get_signal_to_deliver().
         */
-       utrace_control(task, engine, UTRACE_INTERRUPT);
+       if (utrace_control(task, engine, UTRACE_INTERRUPT))
+               WARN_ON(1);
 
        ctx->signr = info->si_signo;
        ctx->stop_code = (PTRACE_EVENT_SIGNAL << 8) | ctx->signr;

Reply via email to