[PANIC] 6.0BETA2 in l2ping flood

Robert Watson rwatson at FreeBSD.org
Sat Aug 20 16:25:33 GMT 2005


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


More information about the freebsd-current mailing list