diff options
author | Mark Brown <broonie@kernel.org> | 2016-02-05 19:28:22 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-05 19:28:22 +0000 |
commit | cd6f5814252060db2d38f57c602db33696c549c0 (patch) | |
tree | 0bcf23a07f1316cb57f0127e5b1622fea59c3e8e /arch/powerpc/kernel/signal_32.c | |
parent | d235b7b42ab59e2e616082a0735b3bcc76685c7b (diff) | |
parent | e14ca734b547e3187713441909897aefdf4e4016 (diff) |
Merge tag 'v3.10.96' into linux-linaro-lsk-v3.10lsk-v3.10-16.02
This is the 3.10.96 stable release
Diffstat (limited to 'arch/powerpc/kernel/signal_32.c')
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index d9b673b06757..8220ae86252c 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -858,6 +858,15 @@ static long restore_tm_user_regs(struct pt_regs *regs, return 1; #endif /* CONFIG_SPE */ + /* Get the top half of the MSR from the user context */ + if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR])) + return 1; + msr_hi <<= 32; + /* If TM bits are set to the reserved value, it's an invalid context */ + if (MSR_TM_RESV(msr_hi)) + return 1; + /* Pull in the MSR TM bits from the user context */ + regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK); /* Now, recheckpoint. This loads up all of the checkpointed (older) * registers, including FP and V[S]Rs. After recheckpointing, the * transactional versions should be loaded. @@ -867,11 +876,6 @@ static long restore_tm_user_regs(struct pt_regs *regs, current->thread.tm_texasr |= TEXASR_FS; /* This loads the checkpointed FP/VEC state, if used */ tm_recheckpoint(¤t->thread, msr); - /* Get the top half of the MSR */ - if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR])) - return 1; - /* Pull in MSR TM from user context */ - regs->msr = (regs->msr & ~MSR_TS_MASK) | ((msr_hi<<32) & MSR_TS_MASK); /* This loads the speculative FP/VEC state, if used */ if (msr & MSR_FP) { |