diff options
author | jhb <jhb@FreeBSD.org> | 2001-10-25 16:50:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-10-25 16:50:16 +0000 |
commit | 655d637879dec802b6cd0cc8cfd51ecde797e30d (patch) | |
tree | a3a97febbeceb99888aa791130295cab45a2a47e /sys/i386 | |
parent | 6aef5c8b75f47bce86f0cbbc871737e2dc3463d7 (diff) | |
download | FreeBSD-src-655d637879dec802b6cd0cc8cfd51ecde797e30d.zip FreeBSD-src-655d637879dec802b6cd0cc8cfd51ecde797e30d.tar.gz |
- Fix typo in comment from previous revision.
- Fix a bug in the LDT changes where the wrong argument was passed to
set_user_ldt() from cpu_switch(). The bug was passing a pointer to the
ldt, but set_user_ldt() takes a pointer to the process' mdproc structure.
Submitted by: bde
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/swtch.s | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index 82e9852..97958fc 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -252,10 +252,11 @@ sw1b: movl %eax,PCPU(CURRENTLDT) jmp 2f -1: pushl %edx /* Preserver pointer to pcb. */ - pushl P_MD+MD_LDT(%eax) /* passing p_md -> set_user_ldt */ +1: pushl %edx /* Preserve pointer to pcb. */ + addl $P_MD,%eax /* Pointer to mdproc is arg. */ + pushl %eax call set_user_ldt /* Check and load the ldt. */ - popl %eax + addl $4,%esp popl %edx 2: |