Received: with ECARTIS (v1.0.0; list netdev); Fri, 07 May 2004 08:22:07 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id i47FM4KO013039 for ; Fri, 7 May 2004 08:22:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i47FLt0m025043; Fri, 7 May 2004 11:21:55 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.64.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i47FLrv08367; Fri, 7 May 2004 11:21:53 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.65.238]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i47FLqex025142; Fri, 7 May 2004 11:21:52 -0400 Date: Fri, 7 May 2004 11:21:52 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Christoph Hellwig cc: "David S. Miller" , Stephen Smalley , Chris Wright , , , Subject: Re: [PATCH][SELINUX] 2/2 sock_create_lite() In-Reply-To: <20040507161455.A31114@infradead.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 5045 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Fri, 7 May 2004, Christoph Hellwig wrote: > On Fri, May 07, 2004 at 11:06:04AM -0400, James Morris wrote: > > This patch adds a function sock_create_lite(), deprecating kernel-wide use > > of sock_alloc(), which has been made static to net/socket.c. > > We're in the stable series and removing exported APIs there shoudn't happen. > Given that sock_alloc() is actually okay for every normal use I don't think > there's enough reason to remove it from the API. Fair enough. > > +int sock_create_lite(int family, int type, int protocol, struct socket **res) > > Should probably be called __sock_create according to linux naming rules. > Also I guess you should actually call it from sock_create instead of > duplicating the code. sock_create() is really very different to sock_alloc(), and the only real duplication is calling the LSM hooks. The version I sent seems to be the simplest approach. (note that __sock_create() is already created in the previous patch). - James -- James Morris