From owner-freebsd-current@FreeBSD.ORG Tue Jan 4 22:22:32 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE03816A4CE for ; Tue, 4 Jan 2005 22:22:32 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6291E43D1F for ; Tue, 4 Jan 2005 22:22:32 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45])j04MLxLk003958; Tue, 4 Jan 2005 16:21:59 -0600 Received: from s228130hz1ew03.apptix-01.savvis.net ([10.146.4.28]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Tue, 4 Jan 2005 16:21:55 -0600 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew03.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Tue, 4 Jan 2005 16:21:54 -0600 Message-ID: <41DB1700.7060708@savvis.net> Date: Tue, 04 Jan 2005 14:21:52 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Roman Kurakin References: <41DB08B9.6090801@savvis.net> <41DB1310.4060807@cronyx.ru> In-Reply-To: <41DB1310.4060807@cronyx.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jan 2005 22:21:54.0137 (UTC) FILETIME=[CB8A1490:01C4F2AB] X-ECS-MailScanner: No virus is found cc: current@freebsd.org cc: Julian Elischer Subject: Re: [Spam] Re: netgraph(3) initialization order X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 22:22:32 -0000 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" > > > >