diff options
Diffstat (limited to 'arch/x86/kernel/ldt.c')
-rw-r--r-- | arch/x86/kernel/ldt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index 8a7660c8394a..0224c3637c73 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c | |||
@@ -35,7 +35,8 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload) | |||
35 | if (mincount <= pc->size) | 35 | if (mincount <= pc->size) |
36 | return 0; | 36 | return 0; |
37 | oldsize = pc->size; | 37 | oldsize = pc->size; |
38 | mincount = (mincount + 511) & (~511); | 38 | mincount = (mincount + (PAGE_SIZE / LDT_ENTRY_SIZE - 1)) & |
39 | (~(PAGE_SIZE / LDT_ENTRY_SIZE - 1)); | ||
39 | if (mincount * LDT_ENTRY_SIZE > PAGE_SIZE) | 40 | if (mincount * LDT_ENTRY_SIZE > PAGE_SIZE) |
40 | newldt = vmalloc(mincount * LDT_ENTRY_SIZE); | 41 | newldt = vmalloc(mincount * LDT_ENTRY_SIZE); |
41 | else | 42 | else |