Message ID | 1469459948-2416-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
Applied to T, V; already landed in X via stable. -Kamal
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 747ad87219f1..e0a66c1bdfd8 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1216,6 +1216,16 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) current->thread.regs = regs - 1; } +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM + /* + * Clear any transactional state, we're exec()ing. The cause is + * not important as there will never be a recheckpoint so it's not + * user visible. + */ + if (MSR_TM_SUSPENDED(mfmsr())) + tm_reclaim_current(0); +#endif + memset(regs->gpr, 0, sizeof(regs->gpr)); regs->ctr = 0; regs->link = 0;