From owner-svn-src-all@FreeBSD.ORG Wed Jun 24 21:18:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0E40106566C; Wed, 24 Jun 2009 21:18:53 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id B5B548FC15; Wed, 24 Jun 2009 21:18:53 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n5OLIqxj033007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Jun 2009 14:18:53 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4A42983C.6050307@freebsd.org> Date: Wed, 24 Jun 2009 14:18:52 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090411) MIME-Version: 1.0 To: Andrew Gallatin References: <200906242109.n5OL9uVb029380@svn.freebsd.org> In-Reply-To: <200906242109.n5OL9uVb029380@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-x.dcc-servers-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r194909 - head/sys/dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 24 Jun 2009 21:18:54 -0000 Andrew Gallatin wrote: > Author: gallatin > Date: Wed Jun 24 21:09:56 2009 > New Revision: 194909 > URL: http://svn.freebsd.org/changeset/base/194909 > > Log: > Add a dying flag to prevent races at detach. > > I tried re-ordering ether_ifdetach(), but this created a new race > where sometimes, when under heavy receive load (>1Mpps) and running > tcpdump, the machine would panic. At panic, the ithread was still in > the original (not dead) if_input() path, and was accessing stale BPF > data structs. By using a dying flag, I can close the interface prior > to if_detach() to be certain the interface cannot send packets up in > the middle of ether_ifdetach. > > There's something else wrong. This is just covering up the real bug. Sam