From: Pavel Emelyanov <xemul@openvz.org>
To: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 09/14] Phonet: allocate and initialize new sockets
Date: Tue, 16 Sep 2008 22:42:52 +0400 [thread overview]
Message-ID: <48CFFE2C.7050908@openvz.org> (raw)
In-Reply-To: <1221577694-4513-9-git-send-email-remi.denis-courmont@nokia.com>
> @@ -71,8 +73,22 @@ static int pn_socket_create(struct net *net, struct socket *sock, int protocol)
> goto out;
> }
>
> - /* TODO: create and init the struct sock */
> - err = -EPROTONOSUPPORT;
> + sk = sk_alloc(net, PF_PHONET, GFP_KERNEL, pnp->prot);
> + if (sk == NULL) {
> + err = -ENOMEM;
> + goto out;
> + }
This turns to be a little bit messy wrt net namespaces.
Look - you allow for sockets to be created (and isolated from each
other) in each namespace, the list of devices is global, whilst
the sysctls are visible in init_net only...
I'd propose to either make this protocol namespaces aware from the
very beginning or to explicitly prohibit any operations with it in
the non-init netns not to forget to fix it in the future (just like
it was done for all the protocols and is still true for most of them).
Thanks,
Pavel
next prev parent reply other threads:[~2008-09-16 18:43 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 14:57 [PATCH 00/14] [RFC] Phonet protocol stack Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 01/14] Phonet global definitions Rémi Denis-Courmont
2008-09-17 4:31 ` Simon Horman
2008-09-17 11:05 ` Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 02/14] Phonet: add CONFIG_PHONET Rémi Denis-Courmont
2008-09-16 16:06 ` Arnaldo Carvalho de Melo
2008-09-16 15:08 ` [PATCH 03/14] Phonet: build the net/phonet/ directory Rémi Denis-Courmont
2008-09-16 16:06 ` Arnaldo Carvalho de Melo
2008-09-17 4:52 ` Simon Horman
2008-09-17 8:44 ` Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 04/14] Phonet: PF_PHONET protocol family support Rémi Denis-Courmont
2008-09-16 16:17 ` Arnaldo Carvalho de Melo
2008-09-17 10:48 ` Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 05/14] Phonet: network device and address handling Rémi Denis-Courmont
2008-09-16 16:41 ` Arnaldo Carvalho de Melo
2008-09-16 15:08 ` [PATCH 06/14] Phonet: Netlink interface Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 07/14] Phonet: common socket glue Rémi Denis-Courmont
2008-09-16 16:50 ` Arnaldo Carvalho de Melo
2008-09-16 15:08 ` [PATCH 08/14] Phonet: receive path socket lookup Rémi Denis-Courmont
2008-09-16 16:52 ` Arnaldo Carvalho de Melo
2008-09-19 6:20 ` Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 09/14] Phonet: allocate and initialize new sockets Rémi Denis-Courmont
2008-09-16 16:53 ` Arnaldo Carvalho de Melo
2008-09-16 18:42 ` Pavel Emelyanov [this message]
2008-09-17 8:30 ` Rémi Denis-Courmont
2008-09-19 10:14 ` Pavel Emelyanov
2008-09-16 15:08 ` [PATCH 10/14] Phonet: Phonet datagram transport protocol Rémi Denis-Courmont
2008-09-16 17:06 ` Arnaldo Carvalho de Melo
2008-09-19 6:33 ` Rémi Denis-Courmont
2008-09-19 15:24 ` [PATCH]: net: Use hton[sl]() was " Arnaldo Carvalho de Melo
2008-09-21 5:21 ` David Miller
2008-11-14 8:32 ` Piet Delaney
2008-09-16 15:08 ` [PATCH 11/14] Phonet: provide MAC header operations Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 12/14] Phonet: proc interface for port range Rémi Denis-Courmont
2008-09-16 15:08 ` [PATCH 13/14] Phonet: emit errors when a packet cannot be delivered locally Rémi Denis-Courmont
2008-09-16 17:11 ` Arnaldo Carvalho de Melo
2008-09-16 15:08 ` [PATCH 14/14] Phonet: kernel documentation Rémi Denis-Courmont
2008-09-16 20:09 ` [PATCH 00/14] [RFC] Phonet protocol stack Marcel Holtmann
2008-09-17 13:52 ` Rémi Denis-Courmont
2008-09-17 4:15 ` Dan Williams
2008-09-19 7:25 ` Rémi Denis-Courmont
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48CFFE2C.7050908@openvz.org \
--to=xemul@openvz.org \
--cc=netdev@vger.kernel.org \
--cc=remi.denis-courmont@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).