From owner-svn-src-projects@freebsd.org Sat Apr 9 13:01:41 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67E55B09593 for ; Sat, 9 Apr 2016 13:01:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E4181664; Sat, 9 Apr 2016 13:01:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u39D1eCi062782; Sat, 9 Apr 2016 13:01:40 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u39D1eCj062781; Sat, 9 Apr 2016 13:01:40 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201604091301.u39D1eCj062781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 9 Apr 2016 13:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r297745 - projects/vnet/sys/net X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2016 13:01:41 -0000 Author: bz Date: Sat Apr 9 13:01:40 2016 New Revision: 297745 URL: https://svnweb.freebsd.org/changeset/base/297745 Log: Always drain the taskq on interface move/detach. Sponsored by: The FreeBSD Foundation Modified: projects/vnet/sys/net/if.c Modified: projects/vnet/sys/net/if.c ============================================================================== --- projects/vnet/sys/net/if.c Sat Apr 9 12:17:31 2016 (r297744) +++ projects/vnet/sys/net/if.c Sat Apr 9 13:01:40 2016 (r297745) @@ -959,6 +959,11 @@ if_detach_internal(struct ifnet *ifp, in /* The one thing we have to do. */ if_delgroups(ifp); + /* + * Remove/wait for pending events. + */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + if (!vmove && !shutdown && ifp->if_vnet->vnet_state <= SI_SUB_PSEUDO_DONE) return (ENOENT); @@ -968,11 +973,6 @@ if_detach_internal(struct ifnet *ifp, in *ifcp = if_clone_findifc(ifp); /* - * Remove/wait for pending events. - */ - taskqueue_drain(taskqueue_swi, &ifp->if_linktask); - - /* * Remove routes and flush queues. */ if_down(ifp);