Commit 4734406c authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

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: 8c09871a ("s390/fpu: limit save and restore to used registers")
Cc: stable@vger.kernel.org
Reported-by: default avatarAristeu Rozanski <aris@redhat.com>
Tested-by: default avatarAristeu Rozanski <aris@redhat.com>
Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 8400291e
...@@ -113,7 +113,7 @@ void load_fpu_state(struct fpu *state, int flags) ...@@ -113,7 +113,7 @@ void load_fpu_state(struct fpu *state, int flags)
int mask; int mask;
if (flags & KERNEL_FPC) if (flags & KERNEL_FPC)
fpu_lfpc(&state->fpc); fpu_lfpc_safe(&state->fpc);
if (!cpu_has_vx()) { if (!cpu_has_vx()) {
if (flags & KERNEL_VXR_V0V7) if (flags & KERNEL_VXR_V0V7)
load_fp_regs_vx(state->vxrs); load_fp_regs_vx(state->vxrs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment