diff options
-rw-r--r-- | kernel/signal.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index f65403da4101..f799a054f292 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -268,6 +268,10 @@ void task_clear_group_stop_pending(struct task_struct *task) | |||
268 | * | 268 | * |
269 | * CONTEXT: | 269 | * CONTEXT: |
270 | * Must be called with @task->sighand->siglock held. | 270 | * Must be called with @task->sighand->siglock held. |
271 | * | ||
272 | * RETURNS: | ||
273 | * %true if group stop completion should be notified to the parent, %false | ||
274 | * otherwise. | ||
271 | */ | 275 | */ |
272 | static bool task_participate_group_stop(struct task_struct *task) | 276 | static bool task_participate_group_stop(struct task_struct *task) |
273 | { | 277 | { |
@@ -284,7 +288,11 @@ static bool task_participate_group_stop(struct task_struct *task) | |||
284 | if (!WARN_ON_ONCE(sig->group_stop_count == 0)) | 288 | if (!WARN_ON_ONCE(sig->group_stop_count == 0)) |
285 | sig->group_stop_count--; | 289 | sig->group_stop_count--; |
286 | 290 | ||
287 | if (!sig->group_stop_count) { | 291 | /* |
292 | * Tell the caller to notify completion iff we are entering into a | ||
293 | * fresh group stop. Read comment in do_signal_stop() for details. | ||
294 | */ | ||
295 | if (!sig->group_stop_count && !(sig->flags & SIGNAL_STOP_STOPPED)) { | ||
288 | sig->flags = SIGNAL_STOP_STOPPED; | 296 | sig->flags = SIGNAL_STOP_STOPPED; |
289 | return true; | 297 | return true; |
290 | } | 298 | } |