Author: zec
Date: Sun Mar  4 11:11:03 2012
New Revision: 232487
URL: http://svn.freebsd.org/changeset/base/232487

Log:
  Properly restore curvnet context when returning early from
  ether_input_internal().
  
  This change only affects options VIMAGE kernel builds.
  
  PR:           kern/165643
  Submitted by: Vijay Singh
  MFC after:    3 days

Modified:
  head/sys/net/if_ethersubr.c

Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c Sun Mar  4 10:37:26 2012        (r232486)
+++ head/sys/net/if_ethersubr.c Sun Mar  4 11:11:03 2012        (r232487)
@@ -661,8 +661,10 @@ ether_input_internal(struct ifnet *ifp, 
                m = (*lagg_input_p)(ifp, m);
                if (m != NULL)
                        ifp = m->m_pkthdr.rcvif;
-               else 
+               else {
+                       CURVNET_RESTORE();
                        return;
+               }
        }
 
        /*
@@ -681,6 +683,7 @@ ether_input_internal(struct ifnet *ifp, 
 #endif
                        ifp->if_ierrors++;
                        m_freem(m);
+                       CURVNET_RESTORE();
                        return;
                }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to