summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog5
-rw-r--r--i386/i386/user_ldt.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 501f0c3..7b4ab40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2007-03-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
[bug #18349 --- ``General Protection Trap'' in `ipc_kmsg_enqueue']
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;
}