aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorSunil Muthuswamy <sunilmut@microsoft.com>2018-07-28 21:58:45 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-29 08:09:56 +0200
commitddcaf3ca4c3c87b955ad6f57952250030be77791 (patch)
tree2c628f32112f522edad3db42c33733cf8a4f92a2 /drivers/hv
parentMerge tag 'fsi-updates-2018-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi into char-misc-next (diff)
downloadlinux-dev-ddcaf3ca4c3c87b955ad6f57952250030be77791.tar.xz
linux-dev-ddcaf3ca4c3c87b955ad6f57952250030be77791.zip
Drivers: hv: vmus: Fix the check for return value from kmsg get dump buffer
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/vmbus_drv.c11
1 files 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 = {