From: tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: namit@vmware.com, mingo@kernel.org, tglx@linutronix.de,
peterz@infradead.org, hpa@zytor.com, bigeasy@linutronix.de,
luto@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip:x86/urgent] x86/ldt: Initialize the context lock for init_mm
Date: Wed, 3 Jul 2019 01:28:02 -0700 [thread overview]
Message-ID: <tip-32232b350d7cd93cdc65fe5a453e6a40b539e9f9@git.kernel.org> (raw)
In-Reply-To: <20190701173354.2pe62hhliok2afea@linutronix.de>
Commit-ID: 32232b350d7cd93cdc65fe5a453e6a40b539e9f9
Gitweb: https://git.kernel.org/tip/32232b350d7cd93cdc65fe5a453e6a40b539e9f9
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
AuthorDate: Mon, 1 Jul 2019 19:33:54 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 3 Jul 2019 10:25:04 +0200
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
---
arch/x86/include/asm/mmu.h | 1 +
1 file changed, 1 insertion(+)
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);
next prev parent reply other threads:[~2019-07-03 8:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 17:33 [PATCH] x86/ldt: Initialize the context lock for init_mm Sebastian Andrzej Siewior
2019-07-01 17:49 ` Nadav Amit
2019-07-03 8:28 ` tip-bot for Sebastian Andrzej Siewior [this message]
2019-07-09 12:02 ` [tip:x86/urgent] " tip-bot for Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-32232b350d7cd93cdc65fe5a453e6a40b539e9f9@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bigeasy@linutronix.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox