From: Stewart Smith <stewart@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, hegdevasant@linux.vnet.ibm.com
Cc: Stewart Smith <stewart@linux.vnet.ibm.com>
Subject: [PATCH v2] powernv: don't attempt to refetch the FSP dump until the user has explicitly acked it.
Date: Fri, 21 Feb 2014 11:15:01 +1100 [thread overview]
Message-ID: <1392941701-2871-1-git-send-email-stewart@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140116121411.624.55662.stgit@hegdevasant.in.ibm.com>
This fixes a bug where we would get two events from OPAL with DUMP_AVAIL
set (which is valid for OPAL to do) and in the second run of extract_dump()
we would fail to free the memory previously allocated for the dump
(leaking ~6MB+) as well as on the second dump_read_data() call OPAL
would not retrieve the dump, leaving us with a dump in linux that was
the correct size but all zeros.
Changes since v1: fixed typo
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/platforms/powernv/opal-dump.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 4447027..53c2675 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -238,6 +238,14 @@ static int extract_dump(void)
{
int rc;
+ /* We can get notified that a dump is available multiple times
+ * (dump_read_info clears the bit in the event from OPAL).
+ * But we should not re-read the dump from OPAL as we
+ * don't get the next dump until we've explicitly acked this one.
+ */
+ if (dump_avail)
+ return OPAL_SUCCESS;
+
/* Get dump ID, size */
rc = dump_read_info();
if (rc != OPAL_SUCCESS)
--
1.7.10.4
next prev parent reply other threads:[~2014-02-21 0:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 12:16 [PATCH v2] powerpc/powernv: Platform dump interface Vasant Hegde
2014-02-08 21:20 ` Anton Blanchard
2014-02-12 15:01 ` Vasant Hegde
2014-03-25 5:52 ` Anton Blanchard
2014-03-26 14:14 ` Vasant Hegde
2014-02-21 0:15 ` Stewart Smith [this message]
2014-02-21 2:52 ` [PATCH v2] powernv: don't attempt to refetch the FSP dump until the user has explicitly acked it Michael Neuling
2014-02-21 3:34 ` Stewart Smith
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=1392941701-2871-1-git-send-email-stewart@linux.vnet.ibm.com \
--to=stewart@linux.vnet.ibm.com \
--cc=hegdevasant@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.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 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).