Skip to content

Commit

Permalink
powerpc/tm: Fix return of 32bit rt signals to active transactions
Browse files Browse the repository at this point in the history
Currently we only restore signals which are transactionally suspended but it's
possible that the transaction can be restored even when it's active.  Most
likely this will result in a transactional rollback by the hardware as the
transaction will have been doomed by an earlier treclaim.

The current code is a legacy of earlier kernel implementations which did
software rollback of active transactions in the kernel.  That code has now gone
but we didn't correctly fix up this part of the signals code which still makes
assumptions based on having software rollback.

This changes the signal return code to always restore both contexts on 32 bit
rt signal return.

Signed-off-by: Michael Neuling <[email protected]>
cc: [email protected] (v3.9+)
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
mikey authored and ozbenh committed Jun 20, 2013
1 parent 2c27a18 commit 55e4341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ long sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
if (__get_user(msr_hi, &mcp->mc_gregs[PT_MSR]))
goto bad;

if (MSR_TM_SUSPENDED(msr_hi<<32)) {
if (MSR_TM_ACTIVE(msr_hi<<32)) {
/* We only recheckpoint on return if we're
* transaction.
*/
Expand Down

0 comments on commit 55e4341

Please sign in to comment.