diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-10-13 15:34:52 +0200 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2026-10-14 17:36:42 +0200 |
| commit | adc9e872f7350e3ac29c1818d8c68b0760b4ba23 (patch) | |
| tree | 4b59b657825e1c4b09f1133a03591cddcca747ab /tools/perf/scripts/python/stackcollapse.py | |
| parent | 450c172f0e59c58a2e623974dae69cda51493720 (diff) | |
| download | linux-adc9e872f7350e3ac29c1818d8c68b0760b4ba23.tar.gz linux-adc9e872f7350e3ac29c1818d8c68b0760b4ba23.zip | |
s390/signal: Fix incorrect return address in signal frame
exit_to_user_mode_loop() can call arch_do_signal_or_restart() multiple
times when signals are pending.
If the first call set up a vDSO system call restart by saving the real
user return address and adjusting psw.addr so it points to the vDSO stub,
a second call builds the signal frame with the wrong return address.
Restore psw.addr from arch_data, and set the return code to -EINTR before
building the signal frame.
This requires restart_block.arch_data to be properly initialized for all
tasks. Move the initialization in copy_thread() in front of the kernel
thread check, so that it also covers kernel threads and their children
(PID 1, usermode helpers). Only PID 0 is left uninitialized, since it
never returns to user space.
Fixes: df29a7440c4b ("s390/signal: switch to using vdso for sigreturn and syscall restart")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
