summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2021-06-11 16:08:18 +0200
committerSasha Levin <sashal@kernel.org>2021-06-30 08:47:03 -0400
commitcf9fdfe7ac67776416edce83bc02c5836e137919 (patch)
treee295fb63bb235a31a10ea2fbec0416edccfb57ce
parentc37ba4086c805c8309cd6a431a0c426de05bcf51 (diff)
downloadlinux-stable-cf9fdfe7ac67776416edce83bc02c5836e137919.tar.gz
linux-stable-cf9fdfe7ac67776416edce83bc02c5836e137919.tar.bz2
linux-stable-cf9fdfe7ac67776416edce83bc02c5836e137919.zip
s390: clear pt_regs::flags on irq entry
commit ca1f4d702d534387aa1f16379edb3b03cdb6ceda upstream. The current irq entry code doesn't initialize pt_regs::flags. On exit to user mode arch_do_signal_or_restart() tests whether PIF_SYSCALL is set, which might yield wrong results. Fix this by clearing pt_regs::flags in the entry.S irq handler code. Reported-by: Heiko Carstens <hca@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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/s390/kernel/entry.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 9cc71ca9a88f..e84f495e7eb2 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -418,6 +418,7 @@ ENTRY(\name)
xgr %r6,%r6
xgr %r7,%r7
xgr %r10,%r10
+ xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
mvc __PT_R8(64,%r11),__LC_SAVE_AREA_ASYNC
stmg %r8,%r9,__PT_PSW(%r11)
tm %r8,0x0001 # coming from user space?