* [PATCH] x86: avoid re-loading LDT in unrelated address spaces
@ 2008-04-22 15:30 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2008-04-22 15:30 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
arch/x86/kernel/ldt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.25/arch/x86/kernel/ldt.c 2008-04-17 04:49:44.000000000 +0200
+++ 2.6.25-x86-filter-load-ldt/arch/x86/kernel/ldt.c 2008-03-04 10:31:12.000000000 +0100
@@ -20,9 +20,9 @@
#include <asm/mmu_context.h>
#ifdef CONFIG_SMP
-static void flush_ldt(void *null)
+static void flush_ldt(void *current_mm)
{
- if (current->active_mm)
+ if (current->active_mm == current_mm)
load_LDT(¤t->active_mm->context);
}
#endif
@@ -68,7 +68,7 @@ static int alloc_ldt(mm_context_t *pc, i
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
- smp_call_function(flush_ldt, NULL, 1, 1);
+ smp_call_function(flush_ldt, current->mm, 1, 1);
preempt_enable();
#else
load_LDT(pc);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-22 15:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-22 15:30 [PATCH] x86: avoid re-loading LDT in unrelated address spaces Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®