Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/benh/powerpc

Pull power fixes from Ben Herrenschmidt:
 "Here are a couple of powerpc fixes for 3.14.

  One is (another!) nasty TM problem, we can crash the kernel by forking
  inside a transaction.  The other one is a simple fix for an alignment
  issue which can hurt in LE mode"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Align p_dyn, p_rela and p_st symbols
  powerpc/tm: Fix crash when forking inside a transaction
  • Loading branch information
Linus Torvalds committed Mar 8, 2014
2 parents 721f0c1 + a5b2cf5 commit 9579f10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,15 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
flush_altivec_to_thread(src);
flush_vsx_to_thread(src);
flush_spe_to_thread(src);
/*
* Flush TM state out so we can copy it. __switch_to_tm() does this
* flush but it removes the checkpointed state from the current CPU and
* transitions the CPU out of TM mode. Hence we need to call
* tm_recheckpoint_new_task() (on the same task) to restore the
* checkpointed state back and the TM mode.
*/
__switch_to_tm(src);
tm_recheckpoint_new_task(src);

*dst = *src;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/reloc_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ _GLOBAL(relocate)

6: blr

.balign 8
p_dyn: .llong __dynamic_start - 0b
p_rela: .llong __rela_dyn_start - 0b
p_st: .llong _stext - 0b
Expand Down

0 comments on commit 9579f10

Please sign in to comment.