diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | i386/i386/user_ldt.c | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -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; } |