Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2005 17:30:22 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-current@freebsd.org, Andrew Thompson <thompsa@freebsd.org>
Subject:   Re: [PANIC] 6.0BETA2 in l2ping flood
Message-ID:  <20050820172838.C14083@fledge.watson.org>
In-Reply-To: <20050820161042.GA749@garage.freebsd.pl>
References:  <b0ba593005081703416d19fbf4@mail.gmail.com> <20050817231838.GA97927@heff.fud.org.nz> <20050818210128.GD18375@garage.freebsd.pl> <20050819011734.GA4206@heff.fud.org.nz> <20050820161042.GA749@garage.freebsd.pl>

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



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