summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/process.c
diff options
context:
space:
mode:
authorDavid S. Miller2005-07-25 04:36:26 +0200
committerDavid S. Miller2005-07-25 04:36:26 +0200
commitdb7d9a4eb700be766cc9f29241483dbb1e748832 (patch)
tree48848384df15d9404ceab05867d7f4ef6b1a4bbe /arch/sparc64/kernel/process.c
parent[SPARC64]: Privatize sun5_timer. (diff)
downloadkernel-qcow2-linux-db7d9a4eb700be766cc9f29241483dbb1e748832.tar.gz
kernel-qcow2-linux-db7d9a4eb700be766cc9f29241483dbb1e748832.tar.xz
kernel-qcow2-linux-db7d9a4eb700be766cc9f29241483dbb1e748832.zip
[SPARC64]: Move syscall success and newchild state out of thread flags.
These two bits were accesses non-atomically from assembler code. So, in order to eliminate any potential races resulting from that, move these pieces of state into two bytes elsewhere in struct thread_info. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/process.c')
-rw-r--r--arch/sparc64/kernel/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index a0cd2b2494d6..cffb1c8ab4fc 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -621,8 +621,8 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));
t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
- _TIF_NEWCHILD |
(((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT);
+ t->new_child = 1;
t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS;
t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf));
t->fpsaved[0] = 0;