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>
This commit is contained in:

committed by
Michael Ellerman

parent
20dbe67062
commit
db1231dcdb
@@ -60,14 +60,6 @@ int dscr_inherit_exec(void)
|
||||
else
|
||||
set_dscr(dscr);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
pid = fork();
|
||||
if (pid == -1) {
|
||||
perror("fork() failed");
|
||||
|
@@ -40,14 +40,6 @@ int dscr_inherit(void)
|
||||
else
|
||||
set_dscr(dscr);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
pid = fork();
|
||||
if (pid == -1) {
|
||||
perror("fork() failed");
|
||||
|
Reference in New Issue
Block a user