[PATCH 02/22] utrace: remove jobctl bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- change utrace_get_signal() to check GROUP_STOP_PENDING instead of
  signal->group_stop_count. With the recent changes group_stop_count
  doesn't necessarily mean this task should participate in group stop.

- remove the "participate in group stop" code from utrace_wakeup() and
  utrace_stop(), this is no longer needed and wrong.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
 kernel/utrace.c |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/kernel/utrace.c b/kernel/utrace.c
index f332d65..6e7fafb 100644
--- a/kernel/utrace.c
+++ b/kernel/utrace.c
@@ -648,11 +648,7 @@ static void utrace_wakeup(struct task_struct *target, struct utrace *utrace)
 {
 	lockdep_assert_held(&utrace->lock);
 	spin_lock_irq(&target->sighand->siglock);
-	if (target->signal->flags & SIGNAL_STOP_STOPPED ||
-	    target->signal->group_stop_count)
-		target->state = TASK_STOPPED;
-	else
-		wake_up_state(target, __TASK_TRACED);
+	wake_up_state(target, __TASK_TRACED);
 	spin_unlock_irq(&target->sighand->siglock);
 }
 
@@ -805,14 +801,6 @@ relock:
 
 	__set_current_state(TASK_TRACED);
 
-	/*
-	 * If there is a group stop in progress,
-	 * we must participate in the bookkeeping.
-	 */
-	if (unlikely(task->signal->group_stop_count) &&
-			!--task->signal->group_stop_count)
-		task->signal->flags = SIGNAL_STOP_STOPPED;
-
 	spin_unlock_irq(&task->sighand->siglock);
 	spin_unlock(&utrace->lock);
 
@@ -2036,7 +2024,7 @@ int utrace_get_signal(struct task_struct *task, struct pt_regs *regs,
 		ka = NULL;
 		memset(return_ka, 0, sizeof *return_ka);
 	} else if (!(task->utrace_flags & UTRACE_EVENT_SIGNAL_ALL) ||
-		   unlikely(task->signal->group_stop_count)) {
+		   unlikely(task->group_stop & GROUP_STOP_PENDING)) {
 		/*
 		 * If no engine is interested in intercepting signals or
 		 * we must stop, let the caller just dequeue them normally
-- 
1.5.5.1

_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/kernel


[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux