]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/Hyper-V: Report crash data in die() when panic_on_oops is set
authorTianyu Lan <Tianyu.Lan@microsoft.com>
Mon, 6 Apr 2020 15:53:31 +0000 (08:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:30:17 +0000 (10:30 +0200)
commitf904261ddab6d9073365a596d9d56e0a4819dda2
treee6871d2973a68bc420fd886356e0e772abac4d4a
parent83064464c9bd7de8f323ccb3609117ed803176ce
x86/Hyper-V: Report crash data in die() when panic_on_oops is set

[ Upstream commit f3a99e761efa616028b255b4de58e9b5b87c5545 ]

When oops happens with panic_on_oops unset, the oops
thread is killed by die() and system continues to run.
In such case, guest should not report crash register
data to host since system still runs. Check panic_on_oops
and return directly in hyperv_report_panic() when the function
is called in the die() and panic_on_oops is unset. Fix it.

Fixes: 7ed4325a44ea ("Drivers: hv: vmbus: Make panic reporting to be more useful")
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200406155331.2105-7-Tianyu.Lan@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/hyperv/hv_init.c
arch/x86/include/asm/mshyperv.h
drivers/hv/vmbus_drv.c