Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c76662e8 authored by Ram Pai's avatar Ram Pai Committed by Michael Ellerman
Browse files

powerpc/pkeys: Save the pkey registers before fork



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.

Fixes: cf43d3b2 ("powerpc: Enable pkey subsystem")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: default avatarRam Pai <linuxram@us.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 4a4a5e5d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -583,6 +583,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)