svn commit: r219275 - head/sys/net

Ermal Luçi eri at FreeBSD.org
Fri Mar 4 20:37:39 UTC 2011


Author: eri
Date: Fri Mar  4 20:37:38 2011
New Revision: 219275
URL: http://svn.freebsd.org/changeset/base/219275

Log:
  Fix a panic that can happen when trying to destroy a lagg(4) with scheduler set to none.
  
  Approved by:	thompsa(mentor)
  MFC after:	1 week

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Fri Mar  4 20:30:18 2011	(r219274)
+++ head/sys/net/if_lagg.c	Fri Mar  4 20:37:38 2011	(r219275)
@@ -341,7 +341,8 @@ lagg_clone_destroy(struct ifnet *ifp)
 	while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL)
 		lagg_port_destroy(lp, 1);
 	/* Unhook the aggregation protocol */
-	(*sc->sc_detach)(sc);
+	if (sc->sc_detach != NULL)
+		(*sc->sc_detach)(sc);
 
 	LAGG_WUNLOCK(sc);
 


More information about the svn-src-head mailing list