From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Nicholas Piggin <nicholas.piggin@gmail.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Ananth Narayan <ananth@in.ibm.com>,
kernelfans@gmail.com,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Hari Bathini <hbathini@linux.vnet.ibm.com>,
Nathan Fontenot <nfont@linux.vnet.ibm.com>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Subject: Re: [PATCH v4 3/7] powerpc/fadump: un-register fadump on kexec path.
Date: Mon, 23 Apr 2018 10:47:20 +0530 [thread overview]
Message-ID: <add68f62-1b82-1c6b-a052-b7c673ab9c78@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180422115858.776bac02@roar.ozlabs.ibm.com>
On 04/22/2018 07:28 AM, Nicholas Piggin wrote:
> On Fri, 20 Apr 2018 10:34:35 +0530
> Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
>
>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>
>> 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.
>
> Is this a bug fix that should go to previous kernels as well?
Yes.
>
>>
>> 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 43bfa535d0ea..16b3e8c5cae0 100644
>> --- a/arch/powerpc/kernel/fadump.c
>> +++ b/arch/powerpc/kernel/fadump.c
>> @@ -1276,6 +1276,9 @@ void fadump_cleanup(void)
>> /* Invalidate the registration only if dump is active. */
>> if (fw_dump.dump_active) {
>> fadump_invalidate_dump(fdm_active);
>> + } else if (fw_dump.dump_registered) {
>> + /* Un-register Firmware-assisted dump if it was registered. */
>> + fadump_unregister_dump(&fdm);
>> }
>> }
>>
>>
>
next prev parent reply other threads:[~2018-04-23 5:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 5:04 [PATCH v4 0/7] powerpc/fadump: Improvements and fixes for firmware-assisted dump Mahesh J Salgaonkar
2018-04-20 5:04 ` [PATCH v4 1/7] powerpc/fadump: Move the metadata region to start of the reserved area Mahesh J Salgaonkar
2018-04-22 1:58 ` Nicholas Piggin
2018-04-23 5:16 ` Mahesh Jagannath Salgaonkar
2018-04-20 5:04 ` [PATCH v4 2/7] powerpc/fadump: Update documentation to reflect the metadata region movement Mahesh J Salgaonkar
2018-04-20 5:04 ` [PATCH v4 3/7] powerpc/fadump: un-register fadump on kexec path Mahesh J Salgaonkar
2018-04-22 1:58 ` Nicholas Piggin
2018-04-23 5:17 ` Mahesh Jagannath Salgaonkar [this message]
2018-04-20 5:04 ` [PATCH v4 4/7] powerpc/fadump: Reservationless firmware assisted dump Mahesh J Salgaonkar
2018-04-23 12:53 ` Hari Bathini
2018-04-20 5:04 ` [PATCH v4 5/7] powerpc/fadump: Update documentation to reflect CMA reservation Mahesh J Salgaonkar
2018-04-20 5:05 ` [PATCH v4 6/7] powerpc/fadump: throw proper error message on fadump registration failure Mahesh J Salgaonkar
2018-04-20 5:05 ` [PATCH v4 7/7] powerpc/fadump: Do not allow hot-remove memory from fadump reserved area Mahesh J Salgaonkar
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=add68f62-1b82-1c6b-a052-b7c673ab9c78@linux.vnet.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=ananth@in.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=kernelfans@gmail.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=nfont@linux.vnet.ibm.com \
--cc=nicholas.piggin@gmail.com \
--cc=srikar@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).