Date: Tue, 04 Jan 2005 14:21:52 -0800 From: Maksim Yevmenkin <maksim.yevmenkin@savvis.net> To: Roman Kurakin <rik@cronyx.ru> Cc: Julian Elischer <julian@elischer.org> Subject: Re: [Spam] Re: netgraph(3) initialization order Message-ID: <41DB1700.7060708@savvis.net> In-Reply-To: <41DB1310.4060807@cronyx.ru> References: <41DB08B9.6090801@savvis.net> <41DB1310.4060807@cronyx.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Roman Kurakin wrote: > Maksim Yevmenkin: > >> Dear Hackers, >> >> would anyone object if i change SI_ORDER_MIDDLE in the >> /sys/netgraph/ng_base.c:2994 to say SI_ORDER_THIRD, i.e. >> >> change >> >> DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); >> >> to >> >> DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); >> >> the reason for this change is that bluetooth device drivers depend on >> netgraph(4) and when both netgraph(4) and bluetooth device driver >> (such as ng_ubt(4)) compiled in the kernel you get a crash. basically >> ng_ubt(4) mod_load callback is called before netgraph(4) mod_load >> callback and ng_findtype() crashes on uninitialized mutex >> (DEVICE_MODULE macro passes SI_SUB_DRIVERS, SI_ORDER_THIRD to the ^^^^^^^^^^^^^^ this should be SI_ORDER_MIDDLE :) >> DECLARE_MODULE). > > I thought this is the task of MODULE_DEPEND. i thought so too :) but it appears to work only when module is _loaded_ (by hand or from /boot/loader.conf), i.e. it does not work if module was compiled in the kernel. > >> option #2 would be to have DEVICE_MODULE_ORDERED macro which accepts >> two extra parameters. >> >> >> and finally option #3 would be to duplicate entire content of the >> DEVICE_MODULE macro in all bluetooth device drivers and specify order >> in DECLARE_MODULE macro. >> >> >> any thoughts? >> >> thanks, >> max >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to >> "freebsd-current-unsubscribe@freebsd.org" > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41DB1700.7060708>