aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-25 19:36:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-25 19:36:33 -0800
commit70d070f56a24b0d966aee547b6c51d09e9185b63 (patch)
tree0899067a56692a9646de54839b50fdc1d22f412a /arch
parentMerge tag 'nfsd-4.5-1' of git://linux-nfs.org/~bfields/linux (diff)
parents390/fpu: signals vs. floating point control register (diff)
downloadlinux-dev-70d070f56a24b0d966aee547b6c51d09e9185b63.tar.xz
linux-dev-70d070f56a24b0d966aee547b6c51d09e9185b63.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 bugfixes from Martin Schwidefsky: "Two critical bug fixes for the signal handling" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/fpu: signals vs. floating point control register s390/compat: correct restore of high gprs on signal return
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/fpu/internal.h2
-rw-r--r--arch/s390/kernel/compat_signal.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/include/asm/fpu/internal.h b/arch/s390/include/asm/fpu/internal.h
index ea91ddfe54eb..629c90865a07 100644
--- a/arch/s390/include/asm/fpu/internal.h
+++ b/arch/s390/include/asm/fpu/internal.h
@@ -40,6 +40,7 @@ static inline void convert_fp_to_vx(__vector128 *vxrs, freg_t *fprs)
static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu)
{
fpregs->pad = 0;
+ fpregs->fpc = fpu->fpc;
if (MACHINE_HAS_VX)
convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs);
else
@@ -49,6 +50,7 @@ static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu)
static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu)
{
+ fpu->fpc = fpregs->fpc;
if (MACHINE_HAS_VX)
convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs);
else
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 66c94417c0ba..4af60374eba0 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -271,7 +271,7 @@ static int restore_sigregs_ext32(struct pt_regs *regs,
/* Restore high gprs from signal stack */
if (__copy_from_user(&gprs_high, &sregs_ext->gprs_high,
- sizeof(&sregs_ext->gprs_high)))
+ sizeof(sregs_ext->gprs_high)))
return -EFAULT;
for (i = 0; i < NUM_GPRS; i++)
*(__u32 *)&regs->gprs[i] = gprs_high[i];