]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pkeys: Save the pkey registers before fork
authorRam Pai <linuxram@us.ibm.com>
Tue, 17 Jul 2018 13:51:05 +0000 (06:51 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Jul 2018 11:34:47 +0000 (21:34 +1000)
commit40500b789a023e22e16af8ae08b4dbeed3860023
treede449519750e13cea226b0b61af622576e28fbff
parent577b2b90d34938b8ea3c95116cea3bbbfe7910d4
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: b5a994822277 ("powerpc: Enable pkey subsystem")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/process.c