Skip to content

Commit 153ffb6

Browse files
committed
exec: Move cleanup of posix timers on exec out of de_thread
These functions have very little to do with de_thread move them out of de_thread an into flush_old_exec proper so it can be more clearly seen what flush_old_exec is doing. Signed-off-by: "Eric W. Biederman" <[email protected]> Reviewed-by: Bernd Edlinger <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Christian Brauner <[email protected]> Reviewed-by: Kirill Tkhai <[email protected]> Signed-off-by: Bernd Edlinger <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
1 parent 0216915 commit 153ffb6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/exec.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,11 +1189,6 @@ static int de_thread(struct task_struct *tsk)
11891189
/* we have changed execution domain */
11901190
tsk->exit_signal = SIGCHLD;
11911191

1192-
#ifdef CONFIG_POSIX_TIMERS
1193-
exit_itimers(sig);
1194-
flush_itimer_signals();
1195-
#endif
1196-
11971192
BUG_ON(!thread_group_leader(tsk));
11981193
return 0;
11991194

@@ -1277,6 +1272,11 @@ int flush_old_exec(struct linux_binprm * bprm)
12771272
if (retval)
12781273
goto out;
12791274

1275+
#ifdef CONFIG_POSIX_TIMERS
1276+
exit_itimers(me->signal);
1277+
flush_itimer_signals();
1278+
#endif
1279+
12801280
/*
12811281
* Make the signal table private.
12821282
*/

0 commit comments

Comments
 (0)