ifnet lock was changed to use sx(9) long time ago.

Don't hold a driver lock for if_free(9).
This commit is contained in:
Pyun YongHyeon 2016-02-22 00:58:04 +00:00
parent 7873b2abd6
commit 15b185341d
2 changed files with 4 additions and 4 deletions

View File

@ -2059,11 +2059,11 @@ msk_detach(device_t dev)
msk_txrx_dma_free(sc_if);
bus_generic_detach(dev);
if (ifp)
if_free(ifp);
sc = sc_if->msk_softc;
sc->msk_if[sc_if->msk_port] = NULL;
MSK_IF_UNLOCK(sc_if);
if (ifp)
if_free(ifp);
return (0);
}

View File

@ -1833,8 +1833,6 @@ sk_detach(dev)
ether_ifdetach(ifp);
SK_IF_LOCK(sc_if);
}
if (ifp)
if_free(ifp);
/*
* We're generally called from skc_detach() which is using
* device_delete_child() to get to here. It's already trashed
@ -1848,6 +1846,8 @@ sk_detach(dev)
sk_dma_jumbo_free(sc_if);
sk_dma_free(sc_if);
SK_IF_UNLOCK(sc_if);
if (ifp)
if_free(ifp);
return(0);
}