summaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2021-06-11 10:27:51 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-06-21 11:19:18 +0200
commitfc66127dc3396338f287c3b494dfbf102547e770 (patch)
tree5c18d8af2e864a4251bb9f33983c18cd53ffcfea /lib/mpi/mpi-sub-ui.c
parent13311e74253fe64329390df80bed3f07314ddd61 (diff)
downloadlinux-stable-fc66127dc3396338f287c3b494dfbf102547e770.tar.gz
linux-stable-fc66127dc3396338f287c3b494dfbf102547e770.tar.bz2
linux-stable-fc66127dc3396338f287c3b494dfbf102547e770.zip
s390: fix system call restart with multiple signals
glibc complained with "The futex facility returned an unexpected error code.". It turned out that the futex syscall returned -ERESTARTSYS because a signal is pending. arch_do_signal_or_restart() restored the syscall parameters (nameley regs->gprs[2]) and set PIF_SYSCALL_RESTART. When another signal is made pending later in the exit loop arch_do_signal_or_restart() is called again. This function clears PIF_SYSCALL_RESTART and checks the return code which is set in regs->gprs[2]. However, regs->gprs[2] was restored in the previous run and no longer contains -ERESTARTSYS, so PIF_SYSCALL_RESTART isn't set again and the syscall is skipped. Fix this by not clearing PIF_SYSCALL_RESTART - it is already cleared in __do_syscall() when the syscall is restarted. Reported-by: Bjoern Walk <bwalk@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Fixes: 56e62a737028 ("s390: convert to generic entry") Cc: <stable@vger.kernel.org> # 5.12 Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions