summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2007-03-06 20:00:21 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:06 +0200
commit058c15bb80182783bb8dc53e268e869f62e22b42 (patch)
tree360aa31db170c6e4b27d4bb63c907fcad1507aea /i386
parentd15aead4e0287de40a4ead3510804f5ac2d34268 (diff)
2007-03-06 Samuel Thibault <samuel.thibault@ens-lyon.org>
* i386/i386/user_ldt.c (i386_set_gdt): Call switch_ktss() if target is current thread.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/user_ldt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/i386/i386/user_ldt.c b/i386/i386/user_ldt.c
index 3f37599..f1b5f6b 100644
--- a/i386/i386/user_ldt.c
+++ b/i386/i386/user_ldt.c
@@ -437,6 +437,13 @@ i386_set_gdt (thread_t thread, int *selector, struct real_descriptor desc)
else
thread->pcb->ims.user_gdt[idx] = desc;
+ /*
+ * If we are modifying the GDT for the current thread,
+ * make sure it is properly set.
+ */
+ if (thread == current_thread())
+ switch_ktss(thread->pcb);
+
return KERN_SUCCESS;
}