Message ID | 20200818184303.56912-2-william.gray@canonical.com |
---|---|
State | New |
Headers | show |
Series | SF 290881 Only notify Hyper-V for die events that are oops | expand |
On Tue, Aug 18, 2020 at 02:43:03PM -0400, William Breathitt Gray wrote: > From: Michael Kelley <mikelley@microsoft.com> > > 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> > > BugLink: https://bugs.launchpad.net/bugs/1891222 So, assuming this will be tested by Microsoft, but please have them document the test case (what to look for on a Hyper-V UI), and what are the risks of missing events here or what else could be broken by this. So, basically, please get the SRU template filled up in the bug. Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> > > (cherry picked from commit 608a973bd52ef1705941b18f55e39655fcfe9cdb) > Signed-off-by: William Breathitt Gray <william.gray@canonical.com> > --- > drivers/hv/vmbus_drv.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > index 0f168f0b1a8f..c97f1964d9ed 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -97,6 +97,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 > -- > 2.25.1 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 0f168f0b1a8f..c97f1964d9ed 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -97,6 +97,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