When a thread forks the contents of AMR, IAMR, UAMOR registers in the newly forked thread are not inherited.
Save the registers before forking, for content of those registers to be automatically copied into the new thread. CC: Michael Ellerman <[email protected]> CC: Florian Weimer <[email protected]> CC: Andy Lutomirski <[email protected]> CC: Thiago Jung Bauermann <[email protected]> Signed-off-by: Ram Pai <[email protected]> --- arch/powerpc/kernel/process.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 1237f13..999dd08 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -582,6 +582,7 @@ static void save_all(struct task_struct *tsk) __giveup_spe(tsk); msr_check_and_clear(msr_all_available); + thread_pkey_regs_save(&tsk->thread); } void flush_all_to_thread(struct task_struct *tsk) -- 1.7.1
