(depends on
 
signals-tracehook_notify_jctl-change-do_signal_stop-do-not-call-tracehook_notify_jctl-in-task_stopped-state.patch)

Now that do_signal_stop() calls tracehook_notify_jctl() in TASK_RUNNING
we can simplify utrace_report_jctl(), task_is_stopped() case is not
possible.

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

 kernel/utrace.c |   20 --------------------
 1 file changed, 20 deletions(-)

--- __UTRACE/kernel/utrace.c~1_REPORT_JCTL      2009-07-29 03:11:19.000000000 
+0200
+++ __UTRACE/kernel/utrace.c    2009-07-31 01:54:29.000000000 +0200
@@ -1607,18 +1607,7 @@ void utrace_report_jctl(int notify, int 
        struct task_struct *task = current;
        struct utrace *utrace = task_utrace_struct(task);
        INIT_REPORT(report);
-       bool stop = task_is_stopped(task);
 
-       /*
-        * We have to come out of TASK_STOPPED in case the event report
-        * hooks might block.  Since we held the siglock throughout, it's
-        * as if we were never in TASK_STOPPED yet at all.
-        */
-       if (stop) {
-               __set_current_state(TASK_RUNNING);
-               task->signal->flags &= ~SIGNAL_STOP_STOPPED;
-               ++task->signal->group_stop_count;
-       }
        spin_unlock_irq(&task->sighand->siglock);
 
        /*
@@ -1647,16 +1636,7 @@ void utrace_report_jctl(int notify, int 
        REPORT(task, utrace, &report, UTRACE_EVENT(JCTL),
               report_jctl, what, notify);
 
-       /*
-        * Retake the lock, and go back into TASK_STOPPED
-        * unless the stop was just cleared.
-        */
        spin_lock_irq(&task->sighand->siglock);
-       if (stop && task->signal->group_stop_count > 0) {
-               __set_current_state(TASK_STOPPED);
-               if (--task->signal->group_stop_count == 0)
-                       task->signal->flags |= SIGNAL_STOP_STOPPED;
-       }
 }
 
 /*

Reply via email to