diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2022-07-11 18:16:25 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-22 10:21:18 +0200 |
| commit | f45f4f82cb48c6ce1d838cf3bace9993c90aaee6 (patch) | |
| tree | ec8d3a3568a20530e0ca45188261821fcdec6621 /fs | |
| parent | f0b5c819b062df8bf5f2acf4697e3871cb3722da (diff) | |
| download | linux-f45f4f82cb48c6ce1d838cf3bace9993c90aaee6.tar.gz linux-f45f4f82cb48c6ce1d838cf3bace9993c90aaee6.tar.bz2 linux-f45f4f82cb48c6ce1d838cf3bace9993c90aaee6.zip | |
fix race between exit_itimers() and /proc/pid/timers
commit d5b36a4dbd06c5e8e36ca8ccc552f679069e2946 upstream.
As Chris explains, the comment above exit_itimers() is not correct,
we can race with proc_timers_seq_ops. Change exit_itimers() to clear
signal->posix_timers with ->siglock held.
Cc: <stable@vger.kernel.org>
Reported-by: chris@accessvector.net
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index 75eb6e0ee7b2..5a75e92b1a0a 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1297,7 +1297,7 @@ int begin_new_exec(struct linux_binprm * bprm) bprm->mm = NULL; #ifdef CONFIG_POSIX_TIMERS - exit_itimers(me->signal); + exit_itimers(me); flush_itimer_signals(); #endif |
