Kernel panic with if_sf.ko

Jung-uk Kim jkim at FreeBSD.org
Wed Jul 1 22:42:13 UTC 2009


On Wednesday 01 July 2009 05:42 pm, Robert Watson wrote:
> On Wed, 1 Jul 2009, Jung-uk Kim wrote:
> >>> Last time I checked, bpf(4) with MAC caused a similar problem
> >>> when it is destroying bpf descriptor label.  GENERIC includes
> >>> MAC by default now. If you don't need MAC, try removing
> >>> "options MAC" from your kernel configuration.
> >>
> >> I was not aware of this problem -- could you provide some more
> >> details? Any panic caused by having MAC in the kernel is a
> >> bug...
> >
> > It was about a month ago.  I had funny impression that you and
> > sam were working on it cause it started happening when sam added
> > bpf detach event handler and MAC was enabled by default.  Any
> > way, I will let you know if I can reproduce the problem.
>
> There have been a number of tear-down related races for ifnets,
> more of which are closed now than before the last few weeks, but
> none MAC-related as far as I'm aware.  If it recurs, please let me
> know and I'm happy to help investigate (MAC-related or otherwise).

I cannot reproduce it any more.  It must be fixed already.  FYI, when 
it happened, I traced it down to:

shutdown ->
dhclient closing fd ->
bpf_dtor() ->
mac_bpfdesc_destroy() ->
mac_bpfdesc_label_free() ->	d->bd_label corrupt!
bpfmac_labelzone_free() ->
uma_zfree() ->
... -> 				page fault!

Any way, sorry for the noise and thanks for fixing this, whoever that 
is.

Jung-uk Kim


More information about the freebsd-current mailing list