summaryrefslogtreecommitdiffstats
path: root/sys/dev/arl
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-09-19 03:10:21 +0000
committerimp <imp@FreeBSD.org>2005-09-19 03:10:21 +0000
commit4e70215e6bf590140205774753c8b0a1f1fe9a36 (patch)
treec3358cebc77043ea8b2a3a5036b02dad6a674b7e /sys/dev/arl
parent37a0bbb7e543c6b2a2f055d676d5a94f781d7738 (diff)
downloadFreeBSD-src-4e70215e6bf590140205774753c8b0a1f1fe9a36.zip
FreeBSD-src-4e70215e6bf590140205774753c8b0a1f1fe9a36.tar.gz
Make sure that we call if_free(ifp) after bus_teardown_intr. Since we
could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
Diffstat (limited to 'sys/dev/arl')
-rw-r--r--sys/dev/arl/if_arl_isa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/arl/if_arl_isa.c b/sys/dev/arl/if_arl_isa.c
index e318adf..fa84396 100644
--- a/sys/dev/arl/if_arl_isa.c
+++ b/sys/dev/arl/if_arl_isa.c
@@ -324,13 +324,13 @@ arl_isa_detach(device_t dev)
arl_stop(sc);
ifmedia_removeall(&sc->arl_ifmedia);
+ bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
#if __FreeBSD_version < 500100
ether_ifdetach(sc->arl_ifp, ETHER_BPF_SUPPORTED);
#else
ether_ifdetach(sc->arl_ifp);
if_free(sc->arl_ifp);
#endif
- bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
arl_release_resources(dev);
return (0);
OpenPOWER on IntegriCloud