From: kys@linuxonhyperv.com
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
jasowang@redhat.com, sthemmin@microsoft.com,
Michael.H.Kelley@microsoft.com, vkuznets@redhat.com
Cc: Sunil Muthuswamy <sunilmut@microsoft.com>,
"K . Y . Srinivasan" <kys@microsoft.com>
Subject: [PATCH 1/4] Drivers: hv: vmus: Fix the check for return value from kmsg get dump buffer
Date: Sat, 28 Jul 2018 21:58:45 +0000 [thread overview]
Message-ID: <20180728215848.13814-1-kys@linuxonhyperv.com> (raw)
In-Reply-To: <20180728215630.13712-1-kys@linuxonhyperv.com>
From: Sunil Muthuswamy <sunilmut@microsoft.com>
The code to support panic control message was checking the return was
checking the return value from kmsg_dump_get_buffer as error value, which
is not what the routine returns. This fixes it.
Fixes: 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")
Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/hv/vmbus_drv.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 05e37283d7c3..a7f33c1f42c5 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1047,13 +1047,10 @@ static void hv_kmsg_dump(struct kmsg_dumper *dumper,
* Write dump contents to the page. No need to synchronize; panic should
* be single-threaded.
*/
- if (!kmsg_dump_get_buffer(dumper, true, hv_panic_page,
- PAGE_SIZE, &bytes_written)) {
- pr_err("Hyper-V: Unable to get kmsg data for panic\n");
- return;
- }
-
- hyperv_report_panic_msg(panic_pa, bytes_written);
+ kmsg_dump_get_buffer(dumper, true, hv_panic_page, PAGE_SIZE,
+ &bytes_written);
+ if (bytes_written)
+ hyperv_report_panic_msg(panic_pa, bytes_written);
}
static struct kmsg_dumper hv_kmsg_dumper = {
--
2.17.1
next prev parent reply other threads:[~2018-07-28 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-28 21:56 [PATCH 0/4] Drivers: hv: vmbus: Miscellaneous fixes/enhancements kys
2018-07-28 21:58 ` kys [this message]
2018-07-28 21:58 ` [PATCH 2/4] Drivers: hv: vmbus: Fix the issue with freeing up hv_ctl_table_hdr kys
2018-07-28 21:58 ` [PATCH 3/4] Drivers: hv: vmbus: Get rid of MSR access from vmbus_drv.c kys
2018-07-28 21:58 ` [PATCH 4/4] Drivers: hv: vmbus: add numa_node to sysfs kys
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=20180728215848.13814-1-kys@linuxonhyperv.com \
--to=kys@linuxonhyperv.com \
--cc=Michael.H.Kelley@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sthemmin@microsoft.com \
--cc=sunilmut@microsoft.com \
--cc=vkuznets@redhat.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