Author: kp
Date: Fri Mar 15 15:52:36 2019
New Revision: 345187
URL: https://svnweb.freebsd.org/changeset/base/345187

Log:
  bridge: Fix STP-related panic
  
  After r345180 we need to have the appropriate vnet context set to delete an
  rtnode in bridge_rtnode_destroy().
  That's usually the case, but not when it's called by the STP code (through
  bstp_notify_rtage()).
  
  We have to set the vnet context in bridge_rtable_expire() just as we do in the
  other STP callback bridge_state_change().
  
  Reviewed by:  kevans

Modified:
  head/sys/net/if_bridge.c

Modified: head/sys/net/if_bridge.c
==============================================================================
--- head/sys/net/if_bridge.c    Fri Mar 15 15:16:31 2019        (r345186)
+++ head/sys/net/if_bridge.c    Fri Mar 15 15:52:36 2019        (r345187)
@@ -3047,6 +3047,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age)
        struct bridge_softc *sc = ifp->if_bridge;
        struct bridge_rtnode *brt;
 
+       CURVNET_SET(ifp->if_vnet);
        BRIDGE_LOCK(sc);
 
        /*
@@ -3065,6 +3066,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age)
                }
        }
        BRIDGE_UNLOCK(sc);
+       CURVNET_RESTORE();
 }
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to