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: Fri, 19 Sep 2008 14:14:08 +0400 [thread overview]
Message-ID: <48D37B70.2010702@openvz.org> (raw)
In-Reply-To: <200809171130.47361.remi.denis-courmont@nokia.com>
Rémi Denis-Courmont wrote:
> Hello,
>
> On Tuesday 16 September 2008 21:42:52 ext Pavel Emelyanov, you wrote:
>>> @@ -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,
>
> I expect pn_socket_create() should forbid this, no?
Well, to be honest, I'd prefer making this ns aware from the very
beginning, but not to force you make things you (probably) don't want
to, I will answer - yes, please, ban this protocol for !init_ns :)
> if (net != &init_net)
> return -EAFNOSUPPORT;
> /* ... */
> sk = sk_alloc(net, PF_PHONET, GFP_KERNEL, pnp->prot);
>
>> the list of devices is global,
>
> Hmmm, good point. Should I forbid adding an address to devices outside the
> initial namespace? what about a device with an existing address being
> migrated?
>
>> whilst the sysctls are visible in init_net only...
>
> Regards,
>
next prev parent reply other threads:[~2008-09-19 10:14 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
2008-09-17 8:30 ` Rémi Denis-Courmont
2008-09-19 10:14 ` Pavel Emelyanov [this message]
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=48D37B70.2010702@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).