From: Sebastian Andrzej Siewior Date: Mon, 1 Jul 2019 17:33:54 +0000 (+0200) Subject: x86/ldt: Initialize the context lock for init_mm X-Git-Tag: v5.4-rc1~611^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39ca5fb4920a96eeab478be2cfa6a2369fef6b02;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Thomas Gleixner Reviewed-by: Nadav Amit Cc: Peter Zijlstra Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20190701173354.2pe62hhliok2afea@linutronix.de Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index 5ff3e8a..e78c7db 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);