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: [email protected] Reported-by: Aristeu Rozanski <[email protected]> Tested-by: Aristeu Rozanski <[email protected]> Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 8400291 commit 4734406

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)