diff options
Diffstat (limited to 'arch/powerpc/kernel/signal_64.c')
| -rw-r--r-- | arch/powerpc/kernel/signal_64.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index b2c002993d78..4b9ca3570344 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
| @@ -214,6 +214,8 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc, | |||
| 214 | 214 | ||
| 215 | BUG_ON(!MSR_TM_ACTIVE(regs->msr)); | 215 | BUG_ON(!MSR_TM_ACTIVE(regs->msr)); |
| 216 | 216 | ||
| 217 | WARN_ON(tm_suspend_disabled); | ||
| 218 | |||
| 217 | /* Remove TM bits from thread's MSR. The MSR in the sigcontext | 219 | /* Remove TM bits from thread's MSR. The MSR in the sigcontext |
| 218 | * just indicates to userland that we were doing a transaction, but we | 220 | * just indicates to userland that we were doing a transaction, but we |
| 219 | * don't want to return in transactional state. This also ensures | 221 | * don't want to return in transactional state. This also ensures |
| @@ -430,6 +432,9 @@ static long restore_tm_sigcontexts(struct task_struct *tsk, | |||
| 430 | 432 | ||
| 431 | BUG_ON(tsk != current); | 433 | BUG_ON(tsk != current); |
| 432 | 434 | ||
| 435 | if (tm_suspend_disabled) | ||
| 436 | return -EINVAL; | ||
| 437 | |||
| 433 | /* copy the GPRs */ | 438 | /* copy the GPRs */ |
| 434 | err |= __copy_from_user(regs->gpr, tm_sc->gp_regs, sizeof(regs->gpr)); | 439 | err |= __copy_from_user(regs->gpr, tm_sc->gp_regs, sizeof(regs->gpr)); |
| 435 | err |= __copy_from_user(&tsk->thread.ckpt_regs, sc->gp_regs, | 440 | err |= __copy_from_user(&tsk->thread.ckpt_regs, sc->gp_regs, |
| @@ -558,7 +563,7 @@ static long restore_tm_sigcontexts(struct task_struct *tsk, | |||
| 558 | /* Make sure the transaction is marked as failed */ | 563 | /* Make sure the transaction is marked as failed */ |
| 559 | tsk->thread.tm_texasr |= TEXASR_FS; | 564 | tsk->thread.tm_texasr |= TEXASR_FS; |
| 560 | /* This loads the checkpointed FP/VEC state, if used */ | 565 | /* This loads the checkpointed FP/VEC state, if used */ |
| 561 | tm_recheckpoint(&tsk->thread, msr); | 566 | tm_recheckpoint(&tsk->thread); |
| 562 | 567 | ||
| 563 | msr_check_and_set(msr & (MSR_FP | MSR_VEC)); | 568 | msr_check_and_set(msr & (MSR_FP | MSR_VEC)); |
| 564 | if (msr & MSR_FP) { | 569 | if (msr & MSR_FP) { |
