diff options
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 1ce0ae3f6ffc..b27e26852fdb 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -176,6 +176,13 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, | |||
176 | */ | 176 | */ |
177 | discard_lazy_cpu_state(); | 177 | discard_lazy_cpu_state(); |
178 | 178 | ||
179 | /* | ||
180 | * Force reload of FP/VEC. | ||
181 | * This has to be done before copying stuff into current->thread.fpr/vr | ||
182 | * for the reasons explained in the previous comment. | ||
183 | */ | ||
184 | regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC); | ||
185 | |||
179 | err |= __copy_from_user(¤t->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); | 186 | err |= __copy_from_user(¤t->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); |
180 | 187 | ||
181 | #ifdef CONFIG_ALTIVEC | 188 | #ifdef CONFIG_ALTIVEC |
@@ -197,9 +204,6 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, | |||
197 | current->thread.vrsave = 0; | 204 | current->thread.vrsave = 0; |
198 | #endif /* CONFIG_ALTIVEC */ | 205 | #endif /* CONFIG_ALTIVEC */ |
199 | 206 | ||
200 | /* Force reload of FP/VEC */ | ||
201 | regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC); | ||
202 | |||
203 | return err; | 207 | return err; |
204 | } | 208 | } |
205 | 209 | ||