diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-14 00:38:22 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-14 00:38:22 +0300 |
commit | f6eb0fed6a3957c0b93e3a00c1ffaad84d4ffc31 (patch) | |
tree | 9728d3ce3dfee85b12648f5665ca76c07b763623 /fs | |
parent | c5f1e32e323157c71eacc6fe087db8d586ff6cb5 (diff) | |
parent | e362359ace6f87c201531872486ff295df306d13 (diff) | |
download | linux-f6eb0fed6a3957c0b93e3a00c1ffaad84d4ffc31.tar.xz |
Merge tag 'timers-urgent-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar:
"Misc timer fixes:
- fix a potential use-after-free bug in posix timers
- correct a prototype
- address a build warning"
* tag 'timers-urgent-2022-08-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
posix-cpu-timers: Cleanup CPU timers before freeing them during exec
time: Correct the prototype of ns_to_kernel_old_timeval and ns_to_timespec64
posix-timers: Make do_clock_gettime() static
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c index 5fd73915c62c..f793221f4eb6 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1304,6 +1304,9 @@ int begin_new_exec(struct linux_binprm * bprm) bprm->mm = NULL; #ifdef CONFIG_POSIX_TIMERS + spin_lock_irq(&me->sighand->siglock); + posix_cpu_timers_exit(me); + spin_unlock_irq(&me->sighand->siglock); exit_itimers(me); flush_itimer_signals(); #endif |