Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2011 07:02:33 +0000 (UTC)
From:      Maxim Konovalov <maxim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r224466 - stable/8/sys/net
Message-ID:  <201107270702.p6R72XC6045470@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: maxim
Date: Wed Jul 27 07:02:33 2011
New Revision: 224466
URL: http://svn.freebsd.org/changeset/base/224466

Log:
  MFC r223846 by thompsa: grab the rlock before checking if our
  interface is enabled.
  
  Approved by:	thompsa

Modified:
  stable/8/sys/net/if_lagg.c

Modified: stable/8/sys/net/if_lagg.c
==============================================================================
--- stable/8/sys/net/if_lagg.c	Wed Jul 27 04:23:26 2011	(r224465)
+++ stable/8/sys/net/if_lagg.c	Wed Jul 27 07:02:33 2011	(r224466)
@@ -1213,14 +1213,15 @@ lagg_input(struct ifnet *ifp, struct mbu
 	struct lagg_softc *sc = lp->lp_softc;
 	struct ifnet *scifp = sc->sc_ifp;
 
+	LAGG_RLOCK(sc);
 	if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
 	    (lp->lp_flags & LAGG_PORT_DISABLED) ||
 	    sc->sc_proto == LAGG_PROTO_NONE) {
+		LAGG_RUNLOCK(sc);
 		m_freem(m);
 		return (NULL);
 	}
 
-	LAGG_RLOCK(sc);
 	ETHER_BPF_MTAP(scifp, m);
 
 	m = (*sc->sc_input)(sc, lp, m);



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