All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/5] do_wait: kill the old BUG_ON, use while_each_thread()
@ 2009-05-07  6:46 Oleg Nesterov
  2009-05-07  7:27 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2009-05-07  6:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ingo Molnar, Roland McGrath, Vitaly Mayatskikh, linux-kernel

do_wait() does BUG_ON(tsk->signal != current->signal), this looks like
a raher obsolete check. At least, I don't think do_wait() is the best
place to verify that all threads have the same ->signal. Remove it.

Also, change the code to use while_each_thread().

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

 kernel/exit.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- PTRACE/kernel/exit.c~4_WHILE	2009-05-07 05:09:51.000000000 +0200
+++ PTRACE/kernel/exit.c	2009-05-07 05:34:40.000000000 +0200
@@ -1595,9 +1595,7 @@ repeat:
 
 		if (wo->wo_flags & __WNOTHREAD)
 			break;
-		tsk = next_thread(tsk);
-		BUG_ON(tsk->signal != current->signal);
-	} while (tsk != current);
+	} while_each_thread(current, tsk);
 	read_unlock(&tasklist_lock);
 
 notask:


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

* Re: [PATCH 4/5] do_wait: kill the old BUG_ON, use while_each_thread()
  2009-05-07  6:46 [PATCH 4/5] do_wait: kill the old BUG_ON, use while_each_thread() Oleg Nesterov
@ 2009-05-07  7:27 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2009-05-07  7:27 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andrew Morton, Ingo Molnar, Vitaly Mayatskikh, linux-kernel

Acked-by: Roland McGrath <roland@redhat.com>

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

end of thread, other threads:[~2009-05-07  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07  6:46 [PATCH 4/5] do_wait: kill the old BUG_ON, use while_each_thread() Oleg Nesterov
2009-05-07  7:27 ` Roland McGrath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.