diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2015-04-28 11:30:40 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-07-22 09:57:59 +0200 |
commit | 4084eb7767418861a81d9e24d222f2536537f58e (patch) | |
tree | e533df4cfdf143e99de369174ff39700b3d38fca /arch/s390/kernel/compat_signal.c | |
parent | 2e54dc3c7dadd4d012f132b1a2b3ab89d9a48cc2 (diff) |
s390/kernel: use test_fp_ctl() to verify the floating-point control word
Use the test_fp_ctl() to test the floating-point control word
for validity and use restore_fp_ctl() to set it in load_sigregs.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/compat_signal.c')
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index fe8d6924efaa..b55d2063a23d 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -172,7 +172,7 @@ static void load_sigregs(void) int i; restore_access_regs(current->thread.acrs); - /* restore_fp_ctl is done in restore_sigregs */ + restore_fp_ctl(¤t->thread.fp_regs.fpc); if (current->thread.vxrs) { for (i = 0; i < __NUM_FPRS; i++) *(freg_t *)(current->thread.vxrs + i) = @@ -217,8 +217,8 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) if (!is_ri_task(current) && (user_sregs.regs.psw.mask & PSW32_MASK_RI)) return -EINVAL; - /* Loading the floating-point-control word can fail. Do that first. */ - if (restore_fp_ctl(&user_sregs.fpregs.fpc)) + /* Test the floating-point-control word. */ + if (test_fp_ctl(user_sregs.fpregs.fpc)) return -EINVAL; /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ |