Skip to content

Commit f3bcd82

Browse files
committed
s390/fpu: Re-add exception handling in load_fpu_state()
JIRA: https://issues.redhat.com/browse/RHEL-39346 Tested: by me commit 4734406 Author: Heiko Carstens <hca@linux.ibm.com> Date: Thu Jul 25 11:31:52 2024 +0200 s390/fpu: Re-add exception handling in load_fpu_state() With the recent rewrite of the fpu code exception handling for the lfpc instruction within load_fpu_state() was erroneously removed. Add it again to prevent that loading invalid floating point register values cause an unhandled specification exception. Fixes: 8c09871 ("s390/fpu: limit save and restore to used registers") Cc: stable@vger.kernel.org Reported-by: Aristeu Rozanski <aris@redhat.com> Tested-by: Aristeu Rozanski <aris@redhat.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
1 parent 21e99e8 commit f3bcd82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/kernel/fpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void load_fpu_state(struct fpu *state, int flags)
113113
int mask;
114114

115115
if (flags & KERNEL_FPC)
116-
fpu_lfpc(&state->fpc);
116+
fpu_lfpc_safe(&state->fpc);
117117
if (!cpu_has_vx()) {
118118
if (flags & KERNEL_VXR_V0V7)
119119
load_fp_regs_vx(state->vxrs);

0 commit comments

Comments
 (0)