From: Hewenliang <hewenliang4@huawei.com>
To: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
<hpa@zytor.com>, <osandov@fb.com>, <rppt@kernel.org>,
<lijiang@redhat.com>, <linux-kernel@vger.kernel.org>
Cc: <hewenliang4@huawei.com>, <hushiyuan@huawei.com>
Subject: [PATCH] x86/kexec: Initialize the value of ident mapping offset
Date: Thu, 5 Nov 2020 22:30:05 -0500 [thread overview]
Message-ID: <20201106033005.2354-1-hewenliang4@huawei.com> (raw)
From: hewenliang <hewenliang4@huawei.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@huawei.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
next reply other threads:[~2020-11-06 3:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 3:30 Hewenliang [this message]
2020-11-06 15:22 ` [PATCH] x86/kexec: Initialize the value of ident mapping offset Borislav Petkov
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=20201106033005.2354-1-hewenliang4@huawei.com \
--to=hewenliang4@huawei.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=hushiyuan@huawei.com \
--cc=lijiang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=osandov@fb.com \
--cc=rppt@kernel.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