summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/mmu.h
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2019-07-01 19:33:54 +0200
committerIngo Molnar <mingo@kernel.org>2019-07-09 13:57:27 +0200
commit39ca5fb4920a96eeab478be2cfa6a2369fef6b02 (patch)
tree0592e2fb936d42a40835340099b9fa81d54577ff /arch/x86/include/asm/mmu.h
parent222a21d29521d144f3dd7a0bc4d4020e448f0126 (diff)
downloadlinux-39ca5fb4920a96eeab478be2cfa6a2369fef6b02.tar.gz
linux-39ca5fb4920a96eeab478be2cfa6a2369fef6b02.tar.bz2
linux-39ca5fb4920a96eeab478be2cfa6a2369fef6b02.zip
x86/ldt: Initialize the context lock for init_mm
The mutex mm->context->lock for init_mm is not initialized for init_mm. This wasn't a problem because it remained unused. This changed however since commit 4fc19708b165c ("x86/alternatives: Initialize temporary mm for patching") Initialize the mutex for init_mm. Fixes: 4fc19708b165c ("x86/alternatives: Initialize temporary mm for patching") Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Nadav Amit <namit@vmware.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andy Lutomirski <luto@kernel.org> Link: https://lkml.kernel.org/r/20190701173354.2pe62hhliok2afea@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/mmu.h')
-rw-r--r--arch/x86/include/asm/mmu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h
index 5ff3e8af2c20..e78c7db87801 100644
--- a/arch/x86/include/asm/mmu.h
+++ b/arch/x86/include/asm/mmu.h
@@ -59,6 +59,7 @@ typedef struct {
#define INIT_MM_CONTEXT(mm) \
.context = { \
.ctx_id = 1, \
+ .lock = __MUTEX_INITIALIZER(mm.context.lock), \
}
void leave_mm(int cpu);