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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360372

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);