linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Borislav Petkov <bp@alien8.de>, <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@redhat.com>, Ning Sun <ning.sun@intel.com>,
	<tboot-devel@lists.sourceforge.net>,
	Thomas Gleixner <tglx@linutronix.de>, <x86@kernel.org>
Cc: Gang Wei <gang.wei@intel.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"Joseph Cihula" <joseph.cihula@intel.com>,
	Shane Wang <shane.wang@intel.com>
Subject: [PATCH] x86, intel_txt: Use correct struct name for tboot_mm initializer
Date: Fri, 23 Oct 2020 11:10:10 -0300	[thread overview]
Message-ID: <0-v1-aa2f00cae409+47-txt_tboot_jgg@nvidia.com> (raw)

For the locks this sets the correct lockdep map name, for mmlist it avoids
creating a corrupted mmlist that is not empty.

Seems like a copy&paste typo.

Fixes: 316253406959 ("x86, intel_txt: Intel TXT boot support")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
---
 arch/x86/kernel/tboot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

If it is deliberate it deserves a big comment why..

diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index 992fb1415c0f1f..14298ecfa100fe 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -93,9 +93,9 @@ static struct mm_struct tboot_mm = {
 	.pgd            = swapper_pg_dir,
 	.mm_users       = ATOMIC_INIT(2),
 	.mm_count       = ATOMIC_INIT(1),
-	MMAP_LOCK_INITIALIZER(init_mm)
-	.page_table_lock =  __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
-	.mmlist         = LIST_HEAD_INIT(init_mm.mmlist),
+	MMAP_LOCK_INITIALIZER(tboot_mm)
+	.page_table_lock = __SPIN_LOCK_UNLOCKED(tboot_mm.page_table_lock),
+	.mmlist         = LIST_HEAD_INIT(tboot_mm.mmlist),
 };
 
 static inline void switch_to_tboot_pt(void)
-- 
2.28.0


                 reply	other threads:[~2020-10-23 14:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=0-v1-aa2f00cae409+47-txt_tboot_jgg@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=bp@alien8.de \
    --cc=gang.wei@intel.com \
    --cc=hpa@zytor.com \
    --cc=joseph.cihula@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ning.sun@intel.com \
    --cc=shane.wang@intel.com \
    --cc=tboot-devel@lists.sourceforge.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).