Skip to content

Commit 4396611

Browse files
oleg-nesterovbrauner
authored andcommitted
exit: kill the pointless __exit_signal()->clear_tsk_thread_flag(TIF_SIGPENDING)
It predates the git history and most probably it was never needed. It doesn't really hurt, but it looks confusing because its purpose is not clear at all. release_task(p) is called when this task has already passed exit_notify() so signal_pending(p) == T shouldn't make any difference. And even _if_ there were a subtle reason to clear TIF_SIGPENDING after exit_notify(), this clear_tsk_thread_flag() can't help anyway. If the exiting task is a group leader or if it is ptraced, release_task() will be likely called when this task has already done its last schedule() from do_task_dead(). Signed-off-by: Oleg Nesterov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Frederic Weisbecker <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent fb3bbcf commit 4396611

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/exit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ static void __exit_signal(struct task_struct *tsk)
204204
spin_unlock(&sighand->siglock);
205205

206206
__cleanup_sighand(sighand);
207-
clear_tsk_thread_flag(tsk, TIF_SIGPENDING);
208207
if (group_dead)
209208
tty_kref_put(tty);
210209
}

0 commit comments

Comments
 (0)