From owner-cvs-all@FreeBSD.ORG Tue Oct 19 15:39:10 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04F9216A4D0 for ; Tue, 19 Oct 2004 15:39:10 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 165A943D3F for ; Tue, 19 Oct 2004 15:39:09 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 59518 invoked from network); 19 Oct 2004 15:38:07 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 19 Oct 2004 15:38:07 -0000 Message-ID: <41753522.1E39FEAE@freebsd.org> Date: Tue, 19 Oct 2004 17:39:14 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Sam Leffler References: <200410191513.i9JFDUbf072176@repoman.freebsd.org> <417532A2.9000901@errno.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys protosw.h src/sys/kern uipc_domain.cuipc_socket2.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2004 15:39:10 -0000 Sam Leffler wrote: > > Andre Oppermann wrote: > > andre 2004-10-19 15:13:30 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/sys protosw.h > > sys/kern uipc_domain.c uipc_socket2.c > > Log: > > Support for dynamically loadable and unloadable protocols within existing protocol > > families. > > > > I don't recall seeing this posted anywhere for comment. I have some > concerns about this general topic and this code seems incomplete (e.g. I > see no locking). Locking is not needed because there are no dead moments in transitioning from unregistered to registered and back. All calls to any of the protocol specific functions will return a valid result (even if it is only EOPNOTSUPP). There is no list manipulation going on. The caller of the function is required to assure that no dangeling sockets, references or memory allocations are left behind after unregistering. It's simply impossible to solve otherwise. For IPDIVERT which I have converted this works very well (it will simply refuse to unload if a divert socket is open). What remaining concerns do you have? -- Andre