diff options
author | nyan <nyan@FreeBSD.org> | 2002-09-24 02:22:35 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-09-24 02:22:35 +0000 |
commit | 8146a5ddd70d2a3aff48d236d2885201fff0b8aa (patch) | |
tree | 23a8678c8ce98d2010bd2805f1a64902ff28d6be /sys/pc98/i386 | |
parent | ad208cd2566edbc7e2f44632cd955549bc2d5d87 (diff) | |
download | FreeBSD-src-8146a5ddd70d2a3aff48d236d2885201fff0b8aa.zip FreeBSD-src-8146a5ddd70d2a3aff48d236d2885201fff0b8aa.tar.gz |
MFi386: revisions 1.536 and 1.538.
Diffstat (limited to 'sys/pc98/i386')
-rw-r--r-- | sys/pc98/i386/machdep.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index a4aba5a..45c77ad 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -873,6 +873,10 @@ exec_setregs(td, entry, stack, ps_strings) struct trapframe *regs = td->td_frame; struct pcb *pcb = td->td_pcb; + /* Reset pc->pcb_gs and %gs before possibly invalidating it. */ + pcb->pcb_gs = _udatasel; + load_gs(_udatasel); + if (td->td_proc->p_md.md_ldt) user_ldt_free(td); @@ -889,12 +893,6 @@ exec_setregs(td, entry, stack, ps_strings) /* PS_STRINGS value for BSD/OS binaries. It is 0 for non-BSD/OS. */ regs->tf_ebx = ps_strings; - /* reset %gs as well */ - if (pcb == PCPU_GET(curpcb)) - load_gs(_udatasel); - else - pcb->pcb_gs = _udatasel; - /* * Reset the hardware debug registers if they were in use. * They won't have any meaning for the newly exec'd process. |