Skip to content

Commit

Permalink
do_wait: kill the old BUG_ON, use while_each_thread()
Browse files Browse the repository at this point in the history
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>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jun 18, 2009
1 parent 64a16ca commit a3f6dfb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,9 +1595,7 @@ static long do_wait(struct wait_opts *wo)

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:
Expand Down

0 comments on commit a3f6dfb

Please sign in to comment.