Skip to content

Commit 4734406

Browse files
hcahcaVasily Gorbik
authored andcommitted
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>
1 parent 8400291 commit 4734406

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)