From owner-freebsd-current@FreeBSD.ORG Sat Aug 20 16:25:33 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08B8E16A41F; Sat, 20 Aug 2005 16:25:33 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59A4743D49; Sat, 20 Aug 2005 16:25:32 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 8A4E046B06; Sat, 20 Aug 2005 12:25:31 -0400 (EDT) Date: Sat, 20 Aug 2005 17:30:22 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Pawel Jakub Dawidek In-Reply-To: <20050820161042.GA749@garage.freebsd.pl> Message-ID: <20050820172838.C14083@fledge.watson.org> References: <20050817231838.GA97927@heff.fud.org.nz> <20050818210128.GD18375@garage.freebsd.pl> <20050819011734.GA4206@heff.fud.org.nz> <20050820161042.GA749@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org, Andrew Thompson Subject: Re: [PANIC] 6.0BETA2 in l2ping flood X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 16:25:33 -0000 On Sat, 20 Aug 2005, Pawel Jakub Dawidek wrote: > +> Thanks for explaining this, you have saved me a lot of suffering. > +> > +> This patch fixes the panic on destroy, is it the correct way to solve > +> the problem? I need to commit something before 6.0. > > My explanation wasn't quite right. > > callout_reset() is called on a valid handle, but right after that, softc > structure if freed, so when softclock calls your function, softc is > already dead. > > Here is a patch which fix it: > > http://people.freebsd.org/~pjd/patches/if_bridge.c.patch > > If you don't want to change bridge_softc structure size, you can also > verify in bridge_init() if the given 'sc' is on bridge_list list. I'm not all that familiar with the details here, as I haven't had a chance to read the code in question in much detail. However, I'm more comfortable with a change that introduces a softc flag than an if_drv_flags flag, as right now if_drv_flags is generally used to expose driver state to the network stack, and there doesn't appear to be a common requirement across drivers (yet) for a dying state. It sounds like your patch addresses this implicitly... Robert N M Watson