Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/pci fix panic when vmx(4) is detached.
details: https://anonhg.NetBSD.org/src/rev/38c4e9fcb382
branches: trunk
changeset: 964835:38c4e9fcb382
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Aug 19 05:23:50 2019 +0000
description:
fix panic when vmx(4) is detached.
diffstat:
sys/arch/x86/pci/if_vmx.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r bed55913c008 -r 38c4e9fcb382 sys/arch/x86/pci/if_vmx.c
--- a/sys/arch/x86/pci/if_vmx.c Mon Aug 19 03:48:41 2019 +0000
+++ b/sys/arch/x86/pci/if_vmx.c Mon Aug 19 05:23:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vmx.c,v 1.46 2019/08/01 09:37:34 knakahara Exp $ */
+/* $NetBSD: if_vmx.c,v 1.47 2019/08/19 05:23:50 knakahara Exp $ */
/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.46 2019/08/01 09:37:34 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.47 2019/08/19 05:23:50 knakahara Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -859,11 +859,13 @@
int i;
workqueue_destroy(sc->vmx_queue_wq);
- for (i = 0; i < sc->vmx_nintrs; i++) {
+ for (i = 0; i < sc->vmx_ntxqueues; i++) {
struct vmxnet3_queue *vmxq = &sc->vmx_queue[i];
softint_disestablish(vmxq->vxq_si);
vmxq->vxq_si = NULL;
+ }
+ for (i = 0; i < sc->vmx_nintrs; i++) {
pci_intr_disestablish(pc, sc->vmx_ihs[i]);
}
pci_intr_release(pc, sc->vmx_intrs, sc->vmx_nintrs);
Home |
Main Index |
Thread Index |
Old Index