diff options
author | David Xu <davidxu@FreeBSD.org> | 2003-04-21 15:05:05 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2003-04-21 15:05:05 +0000 |
commit | 66250360821be817a7764a370c7b1ef8c1d6814e (patch) | |
tree | 33c91f1de513c9cda889cf73c1c281fdf6495390 /sys/amd64/amd64/vm_machdep.c | |
parent | 11b20c685b3e8ddbaf035ea6f1fbecaf161c7c70 (diff) | |
download | src-66250360821be817a7764a370c7b1ef8c1d6814e.tar.gz src-66250360821be817a7764a370c7b1ef8c1d6814e.zip |
Reset pcb_gs and %gs before possibly invalidating it.
Notes
Notes:
svn path=/head/; revision=113796
Diffstat (limited to 'sys/amd64/amd64/vm_machdep.c')
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index f58bdf32668f..bdb189fa4dd1 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -247,9 +247,13 @@ cpu_exit(struct thread *td) { struct mdproc *mdp; + /* Reset pc->pcb_gs and %gs before possibly invalidating it. */ mdp = &td->td_proc->p_md; - if (mdp->md_ldt) + if (mdp->md_ldt) { + td->td_pcb->pcb_gs = _udatasel; + load_gs(_udatasel); user_ldt_free(td); + } reset_dbregs(); } |