summaryrefslogtreecommitdiff
path: root/drivers/hv
diff options
context:
space:
mode:
authorMichael Kelley <mikelley@microsoft.com>2020-08-06 09:22:15 -0700
committerWei Liu <wei.liu@kernel.org>2020-08-07 13:49:37 +0000
commit608a973bd52ef1705941b18f55e39655fcfe9cdb (patch)
treedad3ae67cb9e503f63cb0abd9892a7b0b5322df8 /drivers/hv
parentbcf876870b95592b52519ed4aafcf9d95999bc9c (diff)
Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops
Hyper-V currently may be notified of a panic for any die event. But this results in false panic notifications for various user space traps that are die events. Fix this by ignoring die events that aren't oops. Fixes: 510f7aef65bb ("Drivers: hv: vmbus: prefer 'die' notification chain to 'panic'") Signed-off-by: Michael Kelley <mikelley@microsoft.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Link: https://lore.kernel.org/r/1596730935-11564-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/vmbus_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index d69f4efa3719..45c954d75e70 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -87,6 +87,10 @@ static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
struct die_args *die = (struct die_args *)args;
struct pt_regs *regs = die->regs;
+ /* Don't notify Hyper-V if the die event is other than oops */
+ if (val != DIE_OOPS)
+ return NOTIFY_DONE;
+
/*
* Hyper-V should be notified only once about a panic. If we will be
* doing hyperv_report_panic_msg() later with kmsg data, don't do