summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2013-06-14 03:31:11 +0000
committergibbs <gibbs@FreeBSD.org>2013-06-14 03:31:11 +0000
commit2bb6d0aef69753a5e84bc957ee92ed4c137a038b (patch)
tree37a9f049263e25a344ce002d34b1b71c6f8ca4f2
parent1144352c6483cb692d8a4ce1189e7bd56224df1c (diff)
downloadFreeBSD-src-2bb6d0aef69753a5e84bc957ee92ed4c137a038b.zip
FreeBSD-src-2bb6d0aef69753a5e84bc957ee92ed4c137a038b.tar.gz
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
-rw-r--r--sys/dev/xen/netfront/netfront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index f2dc3ac..68b3bf9 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -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
OpenPOWER on IntegriCloud