From owner-svn-src-all@FreeBSD.ORG Tue Jun 18 13:36:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D0DD97F8; Tue, 18 Jun 2013 13:36:53 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from mail.egr.msu.edu (hill.egr.msu.edu [35.9.37.162]) by mx1.freebsd.org (Postfix) with ESMTP id AD07E1A23; Tue, 18 Jun 2013 13:36:53 +0000 (UTC) Received: from hill (localhost [127.0.0.1]) by mail.egr.msu.edu (Postfix) with ESMTP id 4B0A93EE6D; Tue, 18 Jun 2013 09:27:25 -0400 (EDT) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mail.egr.msu.edu ([127.0.0.1]) by hill (hill.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EX8NoRI8Je-G; Tue, 18 Jun 2013 09:27:25 -0400 (EDT) Received: from EGR authenticated sender Message-ID: <51C06038.5060604@egr.msu.edu> Date: Tue, 18 Jun 2013 09:27:20 -0400 From: Adam McDougall User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130516 Thunderbird/17.0.6 MIME-Version: 1.0 To: "Justin T. Gibbs" Subject: Re: svn commit: r250913 - head/sys/dev/xen/netfront References: <201305221713.r4MHD3n7083573@svn.freebsd.org> In-Reply-To: <201305221713.r4MHD3n7083573@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 13:36:53 -0000 On 05/22/13 13:13, Justin T. Gibbs wrote: > Author: gibbs > Date: Wed May 22 17:13:03 2013 > New Revision: 250913 > URL: http://svnweb.freebsd.org/changeset/base/250913 > > Log: > Correct panic on detach of Xen PV network interfaces. > > dev/xen/netfront: > In netif_free(), properly stop the interface and drain any pending > timers prior to disconnecting from the backend device. > > Remove all media and detach our interface object from the system > prior to deleting it. > > PR: kern/176471 > Submitted by: Roger Pau Monne > Reviewed by: gibbs > MFC after: 1 week > > Modified: > head/sys/dev/xen/netfront/netfront.c > > Modified: head/sys/dev/xen/netfront/netfront.c > ============================================================================== > --- head/sys/dev/xen/netfront/netfront.c Wed May 22 16:33:28 2013 (r250912) > +++ head/sys/dev/xen/netfront/netfront.c Wed May 22 17:13:03 2013 (r250913) > @@ -2171,10 +2171,14 @@ netfront_detach(device_t dev) > static void > netif_free(struct netfront_info *info) > { > + XN_LOCK(info); > + xn_stop(info); > + XN_UNLOCK(info); > + callout_drain(&info->xn_stat_ch); > netif_disconnect_backend(info); > -#if 0 > - close_netdev(info); > -#endif > + ifmedia_removeall(&info->sc_media); > + ether_ifdetach(info->xn_ifp); > + if_free(info->xn_ifp); > } > > static void Can this be MFC'ed soon? Thinking ahead to my next build. Thanks.