Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2020 10:00:46 +0000 (UTC)
From:      Aleksandr Fedorov <afedorov@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360372 - head/sys/netgraph
Message-ID:  <202004271000.03RA0kXK052942@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: afedorov
Date: Mon Apr 27 10:00:46 2020
New Revision: 360372
URL: https://svnweb.freebsd.org/changeset/base/360372

Log:
  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

Modified:
  head/sys/netgraph/ng_eiface.c

Modified: head/sys/netgraph/ng_eiface.c
==============================================================================
--- head/sys/netgraph/ng_eiface.c	Mon Apr 27 09:45:19 2020	(r360371)
+++ head/sys/netgraph/ng_eiface.c	Mon Apr 27 10:00:46 2020	(r360372)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004271000.03RA0kXK052942>