diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2007-07-08 18:17:42 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2007-07-08 18:17:42 +0000 |
commit | ea11c140d0f1f90380911591124e5f3cdb729ff7 (patch) | |
tree | 92dd4a77bdbadf3d0e94e82602ab0060d3c632d5 /sys/i386 | |
parent | 1df86a323d5de61cf2aed237b96b30eee85e15be (diff) | |
download | src-ea11c140d0f1f90380911591124e5f3cdb729ff7.tar.gz src-ea11c140d0f1f90380911591124e5f3cdb729ff7.zip |
NULL_LDT_BASE is used in !SMP kernels too and set_user_ldt() is not
properly called. Address these two issues.
Reported by: Tinderbox
Tested by: le
Approved by: jeff (mentor)
Approved by: re
Notes
Notes:
svn path=/head/; revision=171309
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/sys_machdep.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index 450018d5bda5..98e845aa9789 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -64,13 +64,11 @@ __FBSDID("$FreeBSD$"); #define LD_PER_PAGE 512 #define NEW_MAX_LD(num) ((num + LD_PER_PAGE) & ~(LD_PER_PAGE-1)) #define SIZE_FROM_LARGEST_LD(num) (NEW_MAX_LD(num) << 3) - -#ifdef SMP #define NULL_LDT_BASE ((caddr_t)NULL) +#ifdef SMP static void set_user_ldt_rv(struct vmspace *vmsp); #endif - static int i386_set_ldt_data(struct thread *, int start, int num, union descriptor *descs); static int i386_ldt_grow(struct thread *td, int len); @@ -748,7 +746,7 @@ i386_ldt_grow(struct thread *td, int len) smp_rendezvous(NULL, (void (*)(void *))set_user_ldt_rv, NULL, td->td_proc->p_vmspace); #else - set_user_ldt(td); + set_user_ldt(&td->td_proc->p_md); mtx_unlock_spin(&dt_lock); #endif if (old_ldt_base != NULL_LDT_BASE) { |