diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-25 22:36:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-02-25 22:36:33 -0500 |
commit | 70d070f56a24b0d966aee547b6c51d09e9185b63 (patch) | |
tree | 0899067a56692a9646de54839b50fdc1d22f412a | |
parent | 81904dbbb45490642d16fb1343f95dc0d0eec93f (diff) | |
parent | 1b17cb796f5d40ffa239c6926385abd83a77a49b (diff) |
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
-rw-r--r-- | arch/s390/include/asm/fpu/internal.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 2 |
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) | |||
40 | static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) | 40 | static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) |
41 | { | 41 | { |
42 | fpregs->pad = 0; | 42 | fpregs->pad = 0; |
43 | fpregs->fpc = fpu->fpc; | ||
43 | if (MACHINE_HAS_VX) | 44 | if (MACHINE_HAS_VX) |
44 | convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs); | 45 | convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs); |
45 | else | 46 | else |
@@ -49,6 +50,7 @@ static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) | |||
49 | 50 | ||
50 | static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu) | 51 | static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu) |
51 | { | 52 | { |
53 | fpu->fpc = fpregs->fpc; | ||
52 | if (MACHINE_HAS_VX) | 54 | if (MACHINE_HAS_VX) |
53 | convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs); | 55 | convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs); |
54 | else | 56 | 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, | |||
271 | 271 | ||
272 | /* Restore high gprs from signal stack */ | 272 | /* Restore high gprs from signal stack */ |
273 | if (__copy_from_user(&gprs_high, &sregs_ext->gprs_high, | 273 | if (__copy_from_user(&gprs_high, &sregs_ext->gprs_high, |
274 | sizeof(&sregs_ext->gprs_high))) | 274 | sizeof(sregs_ext->gprs_high))) |
275 | return -EFAULT; | 275 | return -EFAULT; |
276 | for (i = 0; i < NUM_GPRS; i++) | 276 | for (i = 0; i < NUM_GPRS; i++) |
277 | *(__u32 *)®s->gprs[i] = gprs_high[i]; | 277 | *(__u32 *)®s->gprs[i] = gprs_high[i]; |