Re: panic: ifc_free_unit: bit is already cleared

From: Andrew Thompson <thompsa_at_freebsd.org>
Date: Thu, 6 Oct 2005 09:52:25 +1300
On Wed, Oct 05, 2005 at 10:36:39PM +0200, Pawel Jakub Dawidek wrote:
> On Wed, Oct 05, 2005 at 03:49:03PM +1300, Andrew Thompson wrote:
> +> Hi,
> +> 
> +> I have found a repeatable panic with network device cloning, unfortunatly I am
> +> unable to dump on this box. This is sparc64 with a 2 day old current.
> 
> The order is wrong in vlan_modevent().
> 
> if_clone_detach() is freeing ifc_units field, so ifc_free_unit() should not
> be called after that.
> 
> This patch should fix the problem:
> 

Looks good to me, I see that all the cloners use this order in their
unload routine. if_stf and if_vlan are the only users of ifc_free_unit()
and will both have this problem.

/sys/contrib/pf/net/if_pflog.c
/sys/contrib/pf/net/if_pfsync.c
/sys/net/if_bridge.c
/sys/net/if_disc.c
/sys/net/if_faith.c
/sys/net/if_gif.c
/sys/net/if_gre.c
/sys/net/if_ppp.c
/sys/net/if_stf.c
/sys/net/if_vlan.c
/sys/netinet/ip_carp.c

Andrew
Received on Wed Oct 05 2005 - 18:52:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:44 UTC