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
This commit is contained in:
parent
6428da9dde
commit
854cb5a41a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user