svn commit: r251729 - head/sys/dev/xen/netfront
Justin T. Gibbs
gibbs at FreeBSD.org
Fri Jun 14 03:31:11 UTC 2013
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
More information about the svn-src-head
mailing list