Workaround for a recursive acquisition of the driver mutex during device

detach; triggered by ether_ifdetach() -> if_delmulti() -> vr_ioctl().
MFC candidate.

PR:		kern/62889
MFC after:	3 days
This commit is contained in:
Bruce M Simpson 2004-10-26 19:49:45 +00:00
parent f674e945aa
commit 4cc36d8a8b
2 changed files with 4 additions and 0 deletions

View File

@ -798,7 +798,9 @@ vr_detach(device_t dev)
/* These should only be active if attach succeeded */
if (device_is_attached(dev)) {
vr_stop(sc);
VR_UNLOCK(sc); /* XXX: Avoid recursive acquire. */
ether_ifdetach(ifp);
VR_LOCK(sc);
}
if (sc->vr_miibus)
device_delete_child(dev, sc->vr_miibus);

View File

@ -798,7 +798,9 @@ vr_detach(device_t dev)
/* These should only be active if attach succeeded */
if (device_is_attached(dev)) {
vr_stop(sc);
VR_UNLOCK(sc); /* XXX: Avoid recursive acquire. */
ether_ifdetach(ifp);
VR_LOCK(sc);
}
if (sc->vr_miibus)
device_delete_child(dev, sc->vr_miibus);