Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops
Subsystems (2)
PATCH 1/1 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.
--- drivers/hv/vmbus_drv.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/hv/vmbus_drv.c +4 -0
@@ -86,6 +86,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
Signature · 1 line
1.8.3.1
Quoted 15 lines · Michael Kelley
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 <[email protected]>--- drivers/hv/vmbus_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/hv/vmbus_drv.c +0
-0
drivers/hv/vmbus_drv.c static int hyperv_die_event(struct notifier_block *nb, unsigned long val, · line 92
Quoted 7 lines
drivers/hv/vmbus_drv.c +4
-0@@ -86,6 +86,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 ; +
Looking at die_val enum, DIE_PANIC also sounds like something we would want to report but it doesn't get emitted anywhere and honestly I don't quite understand how is was supposed to be different from DIE_OOPS.
Quoted 3 lines
drivers/hv/vmbus_drv.c +0
-0/* * 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
Signature · 1 line
Vitaly
Quoted 29 lines · Vitaly Kuznetsov
Quoted 15 lines · Michael Kelley
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 <[email protected]>--- drivers/hv/vmbus_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/hv/vmbus_drv.c +0
-0drivers/hv/vmbus_drv.c static int hyperv_die_event(struct notifier_block *nb, unsigned long val, · line 92
Quoted 7 lines
drivers/hv/vmbus_drv.c +4
-0@@ -86,6 +86,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 ; +Looking at
die_valenum,DIE_PANICalso sounds like something we would want to report but it doesn't get emitted anywhere and honestly I don't quite understand how is was supposed to be different fromDIE_OOPS.
Quoted 1 line
Reviewed-by Vitaly Kuznetsov <[email protected]>
Applied to hyperv-fixes.
Wei.
Quoted 8 lines
Quoted 4 lines
drivers/hv/vmbus_drv.c +0
-0/* * 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 Signature · 1 line
Vitaly