Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2020 16:13:32 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r368665 - stable/12/sys/net
Message-ID:  <202012151613.0BFGDWO8038037@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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