netdev
[Top] [All Lists]

Re: [PATCH][SELINUX] 2/2 sock_create_lite()

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH][SELINUX] 2/2 sock_create_lite()
From: James Morris <jmorris@xxxxxxxxxx>
Date: Fri, 7 May 2004 11:21:52 -0400 (EDT)
Cc: "David S. Miller" <davem@xxxxxxxxxx>, Stephen Smalley <sds@xxxxxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>, <selinux@xxxxxxxxxxxxx>
In-reply-to: <20040507161455.A31114@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
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
<jmorris@xxxxxxxxxx>



<Prev in Thread] Current Thread [Next in Thread>