ng_eiface: fix kernel panic due to the racecondition in ng_eiface shutdown.

PR:		244247
Reported by:	Vladislav V. Prodan <admin@support.od.ua>
Reviewed by:	vmaffione, lutz_donnerhacke.de
Approved by:	vmaffione (mentor)
Sponsored by:	vstack.com
Differential Revision:	https://reviews.freebsd.org/D24557
This commit is contained in:
Aleksandr Fedorov 2020-04-27 10:00:46 +00:00
parent 6ececd21a6
commit cade08387c

View File

@ -623,8 +623,8 @@ ng_eiface_rmnode(node_p node)
* hence we have to change the current vnet context here.
*/
CURVNET_SET_QUIET(ifp->if_vnet);
ifmedia_removeall(&priv->media);
ether_ifdetach(ifp);
ifmedia_removeall(&priv->media);
if_free(ifp);
CURVNET_RESTORE();
free_unr(V_ng_eiface_unit, priv->unit);