From: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
To: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH] powerpc/fadump: Unregister fadump on kexec down path.
Date: Fri, 27 Apr 2018 11:53:18 +0530 [thread overview]
Message-ID: <152481017041.9024.9087742951572073802.stgit@jupiter.in.ibm.com> (raw)
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Unregister fadump on kexec down path otherwise the fadump registration in
new kexec-ed kernel complains that fadump is already registered. This
makes new kernel to continue using fadump registered by previous kernel
which may lead to invalid vmcore generation. Hence this patch fixes this
issue by un-registering fadump in fadump_cleanup() which is called during
kexec path so that new kernel can register fadump with new valid values.
Fixes: b500afff11f6 ("fadump: Invalidate registration and release reserved memory for general use.")
Cc: stable@vger.kernel.org
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/fadump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 8ceabef40d3d..07e8396d472b 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1180,6 +1180,9 @@ void fadump_cleanup(void)
init_fadump_mem_struct(&fdm,
be64_to_cpu(fdm_active->cpu_state_data.destination_address));
fadump_invalidate_dump(&fdm);
+ } else if (fw_dump.dump_registered) {
+ /* Un-register Firmware-assisted dump if it was registered. */
+ fadump_unregister_dump(&fdm);
}
}
next reply other threads:[~2018-04-27 6:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 6:23 Mahesh J Salgaonkar [this message]
2018-05-08 14:52 ` powerpc/fadump: Unregister fadump on kexec down path Michael Ellerman
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=152481017041.9024.9087742951572073802.stgit@jupiter.in.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.