powerpc: Fix DSCR inheritance over fork()
authorAnton Blanchard <anton@samba.org>
Wed, 9 Dec 2015 09:11:47 +0000 (20:11 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 10 Dec 2015 10:11:13 +0000 (21:11 +1100)
commitdb1231dcdb4dc6cdcbdef0babe641a9162c0dc98
tree34250a59e15b1d3e9620a7a9e3083b0a4fa82bce
parent20dbe67062062c2a790832f0d30e73dba45df7c4
powerpc: Fix DSCR inheritance over fork()

Two DSCR tests have a hack in them:

/*
 * XXX: Force a context switch out so that DSCR
 * current value is copied into the thread struct
 * which is required for the child to inherit the
 * changed value.
 */
sleep(1);

We should not be working around this in the testcase, it is a kernel bug.
Fix it by copying the current DSCR to the child, instead of what we
had in the thread struct at last context switch.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/process.c
tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
tools/testing/selftests/powerpc/dscr/dscr_inherit_test.c