svn commit: r368665 - stable/12/sys/net

Kristof Provost kp at FreeBSD.org
Tue Dec 15 16:13:33 UTC 2020


Author: kp
Date: Tue Dec 15 16:13:32 2020
New Revision: 368665
URL: https://svnweb.freebsd.org/changeset/base/368665

Log:
  MFC r368238:
  
  net: Revert vnet/epair cleanup race mitigation
  
  Revert the mitigation code for the vnet/epair cleanup race (done in r365457).
  r368237 introduced a more reliable fix.
  
  Sponsored by:	Modirum MDPay

Modified:
  stable/12/sys/net/if.c
  stable/12/sys/net/if_epair.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/if.c
==============================================================================
--- stable/12/sys/net/if.c	Tue Dec 15 15:36:41 2020	(r368664)
+++ stable/12/sys/net/if.c	Tue Dec 15 16:13:32 2020	(r368665)
@@ -1322,10 +1322,6 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet)
 	ifindex_free_locked(ifp->if_index);
 	IFNET_WUNLOCK();
 
-	/* Don't re-attach DYING interfaces. */
-	if (ifp->if_flags & IFF_DYING)
-		return;
-
 	/*
 	 * Perform interface-specific reassignment tasks, if provided by
 	 * the driver.

Modified: stable/12/sys/net/if_epair.c
==============================================================================
--- stable/12/sys/net/if_epair.c	Tue Dec 15 15:36:41 2020	(r368664)
+++ stable/12/sys/net/if_epair.c	Tue Dec 15 16:13:32 2020	(r368665)
@@ -609,14 +609,8 @@ epair_qflush(struct ifnet *ifp)
 	struct epair_softc *sc;
 	
 	sc = ifp->if_softc;
-
-	/*
-	 * See epair_clone_destroy(), we can end up getting called twice.
-	 * Don't do anything on the second call.
-	 */
-	if (sc == NULL)
-		return;
-
+	KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n",
+	    __func__, ifp, sc));
 	/*
 	 * Remove this ifp from all backpointer lists. The interface will not
 	 * usable for flushing anyway nor should it have anything to flush


More information about the svn-src-stable mailing list