Skip to content

Commit 610b818

Browse files
committed
exec: Remove BUG_ON(has_group_leader_pid)
With the introduction of exchange_tids thread_group_leader and has_group_leader_pid have become equivalent. Further at this point in the code a thread group has exactly two threads, the previous thread_group_leader that is waiting to be reaped and tsk. So we know it is impossible for tsk to be the thread_group_leader. This is also the last user of has_group_leader_pid so removing this check will allow has_group_leader_pid to be removed. So remove the "BUG_ON(has_group_leader_pid)" that will never fire. Signed-off-by: "Eric W. Biederman" <[email protected]>
1 parent c7f5194 commit 610b818

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/exec.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,6 @@ static int de_thread(struct task_struct *tsk)
11761176
tsk->start_boottime = leader->start_boottime;
11771177

11781178
BUG_ON(!same_thread_group(leader, tsk));
1179-
BUG_ON(has_group_leader_pid(tsk));
11801179
/*
11811180
* An exec() starts a new thread group with the
11821181
* TGID of the previous thread group. Rehash the

0 commit comments

Comments
 (0)