From c942aa0501f215ffd633228c1be07a38c0954943 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Mon, 4 Feb 2008 16:48:03 +0100 Subject: [PATCH] --- yaml --- r: 82872 b: refs/heads/master c: fa0c864d998c9c97d11db097d5736028d5c80985 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/ldt.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0213d115174c..dcc7c4b5cc0d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5430f93257d336346a9018c915e879ce43f5f89 +refs/heads/master: fa0c864d998c9c97d11db097d5736028d5c80985 diff --git a/trunk/arch/x86/kernel/ldt.c b/trunk/arch/x86/kernel/ldt.c index 8a7660c8394a..0224c3637c73 100644 --- a/trunk/arch/x86/kernel/ldt.c +++ b/trunk/arch/x86/kernel/ldt.c @@ -35,7 +35,8 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload) if (mincount <= pc->size) return 0; oldsize = pc->size; - mincount = (mincount + 511) & (~511); + mincount = (mincount + (PAGE_SIZE / LDT_ENTRY_SIZE - 1)) & + (~(PAGE_SIZE / LDT_ENTRY_SIZE - 1)); if (mincount * LDT_ENTRY_SIZE > PAGE_SIZE) newldt = vmalloc(mincount * LDT_ENTRY_SIZE); else