powerpc: Keep thread.dscr and thread.dscr_inherit in sync
When we update the DSCR either via emulation of mtspr(DSCR) or via
a change to dscr_default in sysfs we don't update thread.dscr.
We will eventually update it at context switch time but there is
a period where thread.dscr is incorrect.
If we fork at this point we will copy the old value of thread.dscr
into the child. To avoid this, always keep thread.dscr in sync with
This issue was found with the following testcase:
Signed-off-by: Anton Blanchard <firstname.lastname@example.org>
Cc: <email@example.com> # 3.0+
Signed-off-by: Benjamin Herrenschmidt <firstname.lastname@example.org>
2 files changed