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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to