|
@@ -214,6 +214,8 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc,
|
|
|
|
|
|
BUG_ON(!MSR_TM_ACTIVE(regs->msr));
|
|
|
|
|
|
+ WARN_ON(tm_suspend_disabled);
|
|
|
+
|
|
|
/* Remove TM bits from thread's MSR. The MSR in the sigcontext
|
|
|
* just indicates to userland that we were doing a transaction, but we
|
|
|
* don't want to return in transactional state. This also ensures
|
|
@@ -430,6 +432,9 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
|
|
|
|
|
BUG_ON(tsk != current);
|
|
|
|
|
|
+ if (tm_suspend_disabled)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
/* copy the GPRs */
|
|
|
err |= __copy_from_user(regs->gpr, tm_sc->gp_regs, sizeof(regs->gpr));
|
|
|
err |= __copy_from_user(&tsk->thread.ckpt_regs, sc->gp_regs,
|