From 00e93b4d5315403a6eb8c64c0ba703d3b2d3426a Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 17 Apr 2003 21:57:16 +0000 Subject: [PATCH] Protect the per-process UAC field with the proc lock where it isn't already protected. --- sys/alpha/alpha/vm_machdep.c | 2 ++ sys/alpha/include/proc.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index 28bb44ebeb62..a843cba48c06 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -119,7 +119,9 @@ cpu_fork(td1, p2, td2, flags) td2->td_pcb = (struct pcb *) (td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; td2->td_md.md_flags = td1->td_md.md_flags & MDTD_FPUSED; + PROC_LOCK(p2); p2->p_md.md_uac = p1->p_md.md_uac; + PROC_UNLOCK(p2); /* * Cache the physical address of the pcb, so we can diff --git a/sys/alpha/include/proc.h b/sys/alpha/include/proc.h index e21f433498d5..754ccb02202d 100644 --- a/sys/alpha/include/proc.h +++ b/sys/alpha/include/proc.h @@ -62,7 +62,7 @@ struct mdthread { #define MDP_UAC_MASK (MDP_UAC_NOPRINT | MDP_UAC_NOFIX | MDP_UAC_SIGBUS) struct mdproc { - u_int md_uac; /* Unaligned Access Check flags. */ + u_int md_uac; /* (c) Unaligned Access Check flags. */ }; #endif /* !_MACHINE_PROC_H_ */