From 058c15bb80182783bb8dc53e268e869f62e22b42 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 6 Mar 2007 20:00:21 +0000 Subject: 2007-03-06 Samuel Thibault * i386/i386/user_ldt.c (i386_set_gdt): Call switch_ktss() if target is current thread. --- i386/i386/user_ldt.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'i386') 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; } -- cgit v1.2.3