Merge tag 'execve-v6.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[sfrench/cifs-2.6.git] / fs / exec.c
index ba9eca9c826d88f5a8cec179dbb17b9055f7c11a..9a5ca7b82bfc5ee62e1533c35fbf7e587b077572 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1304,7 +1304,10 @@ int begin_new_exec(struct linux_binprm * bprm)
        bprm->mm = NULL;
 
 #ifdef CONFIG_POSIX_TIMERS
-       exit_itimers(me->signal);
+       spin_lock_irq(&me->sighand->siglock);
+       posix_cpu_timers_exit(me);
+       spin_unlock_irq(&me->sighand->siglock);
+       exit_itimers(me);
        flush_itimer_signals();
 #endif