summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/locore.S4
-rw-r--r--i386/i386/user_ldt.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 3a6d350..7d320d7 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -464,6 +464,8 @@ trap_push_segs:
mov %ss,%ax /* switch to kernel data segment */
mov %ax,%ds /* (same as kernel stack segment) */
mov %ax,%es
+ mov %ax,%fs
+ mov %ax,%gs
trap_set_segs:
cld /* clear direction flag */
@@ -982,6 +984,8 @@ syscall_entry_2:
mov %ss,%dx /* switch to kernel data segment */
mov %dx,%ds
mov %dx,%es
+ mov %dx,%fs
+ mov %dx,%gs
/*
* Shuffle eflags,eip,cs into proper places
diff --git a/i386/i386/user_ldt.c b/i386/i386/user_ldt.c
index 5c5df64..d259ea3 100644
--- a/i386/i386/user_ldt.c
+++ b/i386/i386/user_ldt.c
@@ -225,7 +225,7 @@ i386_set_ldt(thread, first_selector, desc_list, count, desc_list_inline)
(char *)&new_ldt->ldt[0],
old_ldt->desc.limit_low + 1);
}
- else if (thread == current_thread()) {
+ else {
struct real_descriptor template = {0, 0, 0, ACC_P, 0, 0 ,0};
for (dp = &new_ldt->ldt[0], i = 0; i < first_desc; i++, dp++) {