Skip to content

Commit 9df2fe9

Browse files
committed
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: fix ldt limit for 64 bit
2 parents de72aa4 + 5ac37f8 commit 9df2fe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/asm-x86/desc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ static inline void native_set_ldt(const void *addr, unsigned int entries)
192192
unsigned cpu = smp_processor_id();
193193
ldt_desc ldt;
194194

195-
set_tssldt_descriptor(&ldt, (unsigned long)addr,
196-
DESC_LDT, entries * sizeof(ldt) - 1);
195+
set_tssldt_descriptor(&ldt, (unsigned long)addr, DESC_LDT,
196+
entries * LDT_ENTRY_SIZE - 1);
197197
write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT,
198198
&ldt, DESC_LDT);
199199
asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8));

0 commit comments

Comments
 (0)