summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-07-08 18:17:42 +0000
committerattilio <attilio@FreeBSD.org>2007-07-08 18:17:42 +0000
commit62972d9b6ee22bbc2faaa50af6f7a0e18bda5470 (patch)
tree92dd4a77bdbadf3d0e94e82602ab0060d3c632d5 /sys
parentb4ff5952426a6e92dc21f676c1929eea72c2d9a4 (diff)
downloadFreeBSD-src-62972d9b6ee22bbc2faaa50af6f7a0e18bda5470.zip
FreeBSD-src-62972d9b6ee22bbc2faaa50af6f7a0e18bda5470.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/sys_machdep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index 450018d..98e845a 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) {
OpenPOWER on IntegriCloud