提交 ddcaf3ca 编写于 作者: S Sunil Muthuswamy 提交者: Greg Kroah-Hartman

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: 81b18bce ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")
Signed-off-by: NSunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2d8bc619
......@@ -1047,12 +1047,9 @@ 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;
}
kmsg_dump_get_buffer(dumper, true, hv_panic_page, PAGE_SIZE,
&bytes_written);
if (bytes_written)
hyperv_report_panic_msg(panic_pa, bytes_written);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册