summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2020-07-16 05:45:03 +0000
committerjmatthew <jmatthew@openbsd.org>2020-07-16 05:45:03 +0000
commitaff45b01c99eeec09287074e71f4e014a40327a9 (patch)
tree7c27aad55a9f76ed641bfea6f911ebef551abd91
parentuse a mutex to serialise the test and set of ifp->if_link_state. (diff)
downloadwireguard-openbsd-aff45b01c99eeec09287074e71f4e014a40327a9.tar.xz
wireguard-openbsd-aff45b01c99eeec09287074e71f4e014a40327a9.zip
Remove the refill timeout and wait for interrupts to finish when
bringing the interface down. prompted by a crash seen by Hrvoje Popovski ok dlg@
-rw-r--r--sys/dev/pci/if_mcx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 3743295ec9f..feb3d8f5cd7 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.66 2020/07/15 04:36:02 jmatthew Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.67 2020/07/16 05:45:03 jmatthew Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -6969,6 +6969,10 @@ mcx_down(struct mcx_softc *sc)
for (i = 0; i < sc->sc_nqueues; i++) {
struct ifqueue *ifq = sc->sc_queues[i].q_tx.tx_ifq;
ifq_barrier(ifq);
+
+ timeout_del_barrier(&sc->sc_queues[i].q_rx.rx_refill);
+
+ intr_barrier(&sc->sc_queues[i].q_ihc);
}
timeout_del_barrier(&sc->sc_calibrate);