[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201106033005.2354-1-hewenliang4@huawei.com>
Date: Thu, 5 Nov 2020 22:30:05 -0500
From: Hewenliang <hewenliang4@...wei.com>
To: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<hpa@...or.com>, <osandov@...com>, <rppt@...nel.org>,
<lijiang@...hat.com>, <linux-kernel@...r.kernel.org>
CC: <hewenliang4@...wei.com>, <hushiyuan@...wei.com>
Subject: [PATCH] x86/kexec: Initialize the value of ident mapping offset
From: hewenliang <hewenliang4@...wei.com>
It is necessary to initialize the value of ident mapping offset.
This can not only avoid using dirty data, but also improve the
code readability when we using the variable of offset.
Signed-off-by: hewenliang <hewenliang4@...wei.com>
---
arch/x86/kernel/machine_kexec_64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index a29a44a98e5b..101cbce893e4 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -196,6 +196,7 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
.alloc_pgt_page = alloc_pgt_page,
.context = image,
.page_flag = __PAGE_KERNEL_LARGE_EXEC,
+ .offset = 0,
.kernpg_flag = _KERNPG_TABLE_NOENC,
};
unsigned long mstart, mend;
--
2.19.1
Powered by blists - more mailing lists