Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2013 03:31:11 +0000 (UTC)
From:      "Justin T. Gibbs" <gibbs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251729 - head/sys/dev/xen/netfront
Message-ID:  <201306140331.r5E3VBAO039558@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gibbs
Date: Fri Jun 14 03:31:11 2013
New Revision: 251729
URL: http://svnweb.freebsd.org/changeset/base/251729

Log:
  sys/dev/xen/netfront/netfront.c:
  	In netif_free(), call ifmedia_removeall() after ether_ifdetach()
  	so that bpf listeners are detached, any link state processing
  	is completed, and there is no chance for external reference to media
  	information.
  
  Suggested by:	yongari
  MFC after:	1 week

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c	Fri Jun 14 03:28:29 2013	(r251728)
+++ head/sys/dev/xen/netfront/netfront.c	Fri Jun 14 03:31:11 2013	(r251729)
@@ -2178,12 +2178,12 @@ netif_free(struct netfront_info *info)
 	XN_UNLOCK(info);
 	callout_drain(&info->xn_stat_ch);
 	netif_disconnect_backend(info);
-	ifmedia_removeall(&info->sc_media);
 	if (info->xn_ifp != NULL) {
 		ether_ifdetach(info->xn_ifp);
 		if_free(info->xn_ifp);
 		info->xn_ifp = NULL;
 	}
+	ifmedia_removeall(&info->sc_media);
 }
 
 static void



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