Date: Sat, 9 Jan 2010 11:28:01 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/amd64/amd64 sys_machdep.c Message-ID: <201001091128.o09BSHLe042153@repoman.freebsd.org>
index | next in thread | raw e-mail
kib 2010-01-09 11:28:01 UTC
FreeBSD src repository
Modified files:
sys/amd64/amd64 sys_machdep.c
Log:
SVN rev 201890 on 2010-01-09 11:28:01Z by kib
Set md_ldt (pointer to the LDT) after md_ldt_sd (system segment
descriptor for the LDT) is populated. md_ldt is used by context-switch
code as indicator that LDT segment register shall be loaded with
GUSERLDT segment instead of 0, so context switch at the wrong time may
cause attempt to load non-populated descriptor.
Use store with the barrier to prevent other CPUs from seeing updated
md_ldt but not seeing updated md_ldt_sd. Multithreaded process may
context-switch to another thread of the process on another CPU and read
md_ldt.
MFC after: 1 week
Revision Changes Path
1.95 +2 -1 src/sys/amd64/amd64/sys_machdep.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001091128.o09BSHLe042153>
