mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wait_task_stopped/continued: remove unneeded p->signal != NULL check
@ 2007-08-28 10:18 Oleg Nesterov
  2007-08-28 10:25 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2007-08-28 10:18 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Roland McGrath, linux-kernel

The child was found on ->children list under tasklist_lock, it must have a
valid ->signal. __exit_signal() both removes the task from parent->children
and clears ->signal "atomically" under write_lock(tasklist).

Remove unneeded checks.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- t/kernel/exit.c~	2007-08-28 14:07:53.000000000 +0400
+++ t/kernel/exit.c	2007-08-28 14:09:14.000000000 +0400
@@ -1348,7 +1348,7 @@ static int wait_task_stopped(struct task
 	if (!p->exit_code)
 		return 0;
 	if (delayed_group_leader && !(p->ptrace & PT_PTRACED) &&
-	    p->signal && p->signal->group_stop_count > 0)
+	    p->signal->group_stop_count > 0)
 		/*
 		 * A group stop is in progress and this is the group leader.
 		 * We won't report until all threads have stopped.
@@ -1462,9 +1462,6 @@ static int wait_task_continued(struct ta
 	pid_t pid;
 	uid_t uid;
 
-	if (unlikely(!p->signal))
-		return 0;
-
 	if (!(p->signal->flags & SIGNAL_STOP_CONTINUED))
 		return 0;
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] wait_task_stopped/continued: remove unneeded p->signal != NULL check
  2007-08-28 10:18 [PATCH] wait_task_stopped/continued: remove unneeded p->signal != NULL check Oleg Nesterov
@ 2007-08-28 10:25 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2007-08-28 10:25 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andrew Morton, linux-kernel

Looks good to me.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-28 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-28 10:18 [PATCH] wait_task_stopped/continued: remove unneeded p->signal != NULL check Oleg Nesterov
2007-08-28 10:25 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®