x86, intel_txt: Use correct struct name for tboot_mm initializer
diff mbox series

Message ID 0-v1-aa2f00cae409+47-txt_tboot_jgg@nvidia.com
State New, archived
Headers show
Series
  • x86, intel_txt: Use correct struct name for tboot_mm initializer
Related show

Commit Message

Jason Gunthorpe Oct. 23, 2020, 2:10 p.m. UTC
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..

Patch
diff mbox series

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)