aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/wi
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2003-04-29 03:22:39 +0000
committerWarner Losh <imp@FreeBSD.org>2003-04-29 03:22:39 +0000
commit854cb5a41aac2f8f140c8510fabf95c916e075b0 (patch)
treedabe47fc37655ec4cc13fe472c9ef7476af85581 /sys/dev/wi
parent6428da9dde2a7e8f36a7cbda92d5d8d382c04e4e (diff)
downloadsrc-854cb5a41aac2f8f140c8510fabf95c916e075b0.tar.gz
src-854cb5a41aac2f8f140c8510fabf95c916e075b0.zip
Don't hold a driver lock across bus_teardown_intr. Jhb points out
that one cannot generally hold a lock and call bus_teardown_intr. This is race free with wi_intr because bus_teardown_intr won't allow wi_intr to be called after it returns. # jeff hsu points out that there might be a race between this unlock # and wi_start. While that may be true also, it won't impact this commit. Submitted by: jhb
Notes
Notes: svn path=/head/; revision=114190
Diffstat (limited to 'sys/dev/wi')
-rw-r--r--sys/dev/wi/if_wi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 62e8bbc1f0ef..cc53a0d4104c 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -486,10 +486,9 @@ wi_detach(device_t dev)
ifmedia_removeall(&sc->sc_media);
ieee80211_ifdetach(ifp);
+ WI_UNLOCK(sc);
bus_teardown_intr(dev, sc->irq, sc->wi_intrhand);
wi_free(dev);
-
- WI_UNLOCK(sc);
#if __FreeBSD_version >= 500000
mtx_destroy(&sc->sc_mtx);
#endif