[PATCH] x86, intel_txt: Use correct struct name for tboot_mm initializer

From: Jason Gunthorpe
Date: Fri Oct 23 2020 - 10:10:18 EST


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@xxxxxxxxxx>
---
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