Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jan 2005 13:43:57 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Scott Long <scottl@freebsd.org>, Julian Elischer <julian@elischer.org>, Roman Kurakin <rik@cronyx.ru>
Cc:        current@freebsd.org
Subject:   Re: netgraph(4) initialization order
Message-ID:  <41DC5F9D.1040900@savvis.net>
In-Reply-To: <41DC5D70.5030105@freebsd.org>
References:  <41DB08B9.6090801@savvis.net> <41DB1310.4060807@cronyx.ru> <41DB1700.7060708@savvis.net> <41DB1839.9080104@elischer.org> <41DC4FA2.8070609@savvis.net> <41DC5398.8020508@freebsd.org> <41DC5561.4090005@savvis.net> <41DC5690.3090205@freebsd.org> <41DC598D.50409@savvis.net> <41DC5C5E.9080706@savvis.net> <41DC5D70.5030105@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Scott Long wrote:
> Maksim Yevmenkin wrote:
> 
>> [...]
>>
>>>>> how about new attached patch?
>>>>>
>>>>
>>>> Exactly what I had in mind =-)  Have you tested this out to make sure
>>>>  it fixes the problem cases?
>>>
>>>
>>>
>>> i'm building kernel now, but i'm almost certain it will fix the 
>>> problem. the stack trace i got points to ng_newtype() calling 
>>> ng_findtype() that wants to mtx_lock(ng_typelist_mtx). i'm pretty 
>>> sure the ng_typelist_mtx mutex was not initialized, that is 
>>> ngb_mod_event() was never called.
>>>
>>> panic: mtx_lock() of spin mutex (null) @ 
>>> /usr/src/sys/netgraph/ng_base.c:1189
>>>
>>> no mutex name and ng_typelist_mtx is *not* a spin mutex.
>>>
>>> ng_ubt(4) calls ng_newtype() from its mod_event handler, so i think 
>>> ng_ubt(4) mod_event handler was called before ngb_mod_event().
>>
>>
>>
>> built new kernel (with netgraph and ubt compiled in) and rebooted the 
>> box. no crash. so patch works.
>>
>> can i commit it?
> 
> Sounds good, thanks for working on this!  I don't think that there are
> any API/ABI implications for RELENG_5 that would prevent this from being
> merged back, but we might want to think a bit more about it just to be
> sure.

i can not think of any API/ABI implications for RELENG_5. i will double 
check anyway. if i will find anything, i will let you guys know.

i will wait for Julian and Roman to give me green light and then i will 
commit it to -current.

thanks,
max



> 
> Scott



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