diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/ldt.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/tls.c | 7 |
3 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index 7eb0c8a45734..3e872b468533 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c @@ -223,8 +223,7 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode) } } - ldt.a = LDT_entry_a(&ldt_info); - ldt.b = LDT_entry_b(&ldt_info); + fill_ldt(&ldt, &ldt_info); if (oldmode) ldt.avl = 0; diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 86c310acc989..f91521e26335 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -457,8 +457,7 @@ static inline void set_32bit_tls(struct task_struct *t, int tls, u32 addr) }; struct desc_struct *desc = (void *)t->thread.tls_array; desc += tls; - desc->a = LDT_entry_a(&ud); - desc->b = LDT_entry_b(&ud); + fill_ldt(desc, &ud); } static inline u32 read_32bit_tls(struct task_struct *t, int tls) diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c index 67a377621b12..74d2b65a82eb 100644 --- a/arch/x86/kernel/tls.c +++ b/arch/x86/kernel/tls.c @@ -67,10 +67,9 @@ int do_set_thread_area(struct task_struct *p, int idx, if (LDT_empty(&info)) { desc[0] = 0; desc[1] = 0; - } else { - desc[0] = LDT_entry_a(&info); - desc[1] = LDT_entry_b(&info); - } + } else + fill_ldt((struct desc_struct *)desc, &info); + if (t == ¤t->thread) load_TLS(t, cpu); |