All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netlink: use the appropriate namespace pid
@ 2010-03-20  1:38 Tom Goff
  2010-03-22  4:30 ` David Miller
  2010-03-23  3:25 ` David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Tom Goff @ 2010-03-20  1:38 UTC (permalink / raw)
  To: netdev

This was included in OpenVZ kernels but wasn't integrated upstream.
>From git://git.openvz.org/pub/linux-2.6.24-openvz:

	commit 5c69402f18adf7276352e051ece2cf31feefab02
	Author: Alexey Dobriyan <adobriyan@openvz.org>
	Date:   Mon Dec 24 14:37:45 2007 +0300

	    netlink: fixup ->tgid to work in multiple PID namespaces

Signed-off-by: Tom Goff <thomas.goff@boeing.com>
---
 net/netlink/af_netlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 320d042..b5ac0cd 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -545,7 +545,7 @@ static int netlink_autobind(struct socket *sock)
 	struct hlist_head *head;
 	struct sock *osk;
 	struct hlist_node *node;
-	s32 pid = current->tgid;
+	s32 pid = task_tgid_vnr(current);
 	int err;
 	static s32 rover = -4097;
 
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-20  1:38 [PATCH] netlink: use the appropriate namespace pid Tom Goff
@ 2010-03-22  4:30 ` David Miller
  2010-03-24  7:58   ` Alexey Dobriyan
  2010-03-23  3:25 ` David Miller
  1 sibling, 1 reply; 12+ messages in thread
From: David Miller @ 2010-03-22  4:30 UTC (permalink / raw)
  To: thomas.goff; +Cc: netdev, adobriyan

From: Tom Goff <thomas.goff@boeing.com>
Date: Fri, 19 Mar 2010 18:38:50 -0700

> This was included in OpenVZ kernels but wasn't integrated upstream.
>>From git://git.openvz.org/pub/linux-2.6.24-openvz:
> 
> 	commit 5c69402f18adf7276352e051ece2cf31feefab02
> 	Author: Alexey Dobriyan <adobriyan@openvz.org>
> 	Date:   Mon Dec 24 14:37:45 2007 +0300
> 
> 	    netlink: fixup ->tgid to work in multiple PID namespaces
> 
> Signed-off-by: Tom Goff <thomas.goff@boeing.com>

Well, at least CC: the person whose patches your pushing
around, maybe they had a reason to not include it?  The
openvz guys have been extremely good about submitting
their stuff so they deserve the benefit of the doubt.

Alexey, can you review Tom's namespace patches in this
set?

Thanks!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-20  1:38 [PATCH] netlink: use the appropriate namespace pid Tom Goff
  2010-03-22  4:30 ` David Miller
@ 2010-03-23  3:25 ` David Miller
  1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2010-03-23  3:25 UTC (permalink / raw)
  To: thomas.goff; +Cc: netdev

From: Tom Goff <thomas.goff@boeing.com>
Date: Fri, 19 Mar 2010 18:38:50 -0700

> This was included in OpenVZ kernels but wasn't integrated upstream.
>>From git://git.openvz.org/pub/linux-2.6.24-openvz:
> 
> 	commit 5c69402f18adf7276352e051ece2cf31feefab02
> 	Author: Alexey Dobriyan <adobriyan@openvz.org>
> 	Date:   Mon Dec 24 14:37:45 2007 +0300
> 
> 	    netlink: fixup ->tgid to work in multiple PID namespaces
> 
> Signed-off-by: Tom Goff <thomas.goff@boeing.com>

BTW, we're ok without this.

The 'pid' in this code is just an arbitrary port number.  We are
merely using the tgid to seed the port allocator, so it doesn't have
to be the real proper tgid.

I'm therefore dropping this for now.  If Alexey can show why we
might need this, we can revisit the patch.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-22  4:30 ` David Miller
@ 2010-03-24  7:58   ` Alexey Dobriyan
  2010-03-24  8:19     ` Alexey Dobriyan
  2010-03-24 14:18     ` [PATCH] netlink: use the appropriate namespace pid Goff, Thomas
  0 siblings, 2 replies; 12+ messages in thread
From: Alexey Dobriyan @ 2010-03-24  7:58 UTC (permalink / raw)
  To: David Miller; +Cc: thomas.goff, netdev, adobriyan

On Mon, Mar 22, 2010 at 6:30 AM, David Miller <davem@davemloft.net> wrote:
> From: Tom Goff <thomas.goff@boeing.com>
> Date: Fri, 19 Mar 2010 18:38:50 -0700
>
>> This was included in OpenVZ kernels but wasn't integrated upstream.
>>>From git://git.openvz.org/pub/linux-2.6.24-openvz:
>>
>>       commit 5c69402f18adf7276352e051ece2cf31feefab02
>>       Author: Alexey Dobriyan <adobriyan@openvz.org>
>>       Date:   Mon Dec 24 14:37:45 2007 +0300
>>
>>           netlink: fixup ->tgid to work in multiple PID namespaces
>>
>> Signed-off-by: Tom Goff <thomas.goff@boeing.com>
>
> Well, at least CC: the person whose patches your pushing
> around, maybe they had a reason to not include it?  The
> openvz guys have been extremely good about submitting
> their stuff so they deserve the benefit of the doubt.
>
> Alexey, can you review Tom's namespace patches in this
> set?

ACK tgid patch, should have sent it myself long ago.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-24  7:58   ` Alexey Dobriyan
@ 2010-03-24  8:19     ` Alexey Dobriyan
  2010-03-27  3:14       ` David Miller
  2010-03-24 14:18     ` [PATCH] netlink: use the appropriate namespace pid Goff, Thomas
  1 sibling, 1 reply; 12+ messages in thread
From: Alexey Dobriyan @ 2010-03-24  8:19 UTC (permalink / raw)
  To: David Miller; +Cc: thomas.goff, netdev, adobriyan

>> Alexey, can you review Tom's namespace patches in this
>> set?

re netns sched patch:

* in psched_open() PDE(inode)->data isn't needed because
  it isn't used -- just pass NULL.
* drop useless trailing return; in psched_net_exit() :^)
* sch_mirred.c still won't work in netns

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] netlink: use the appropriate namespace pid
  2010-03-24  7:58   ` Alexey Dobriyan
  2010-03-24  8:19     ` Alexey Dobriyan
@ 2010-03-24 14:18     ` Goff, Thomas
  2010-03-27  3:15       ` David Miller
  1 sibling, 1 reply; 12+ messages in thread
From: Goff, Thomas @ 2010-03-24 14:18 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: David Miller, netdev, adobriyan

On Wed March 24, 2010 12:59 AM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> ACK tgid patch, should have sent it myself long ago.

Thanks for reviewing this.

David is correct that pid is arbitrary here anyway so it really
shouldn't matter.  The patch just lets applications that make an
incorrect assumption that happens to usually be right for the
initial namespace work similarly in other namespaces.  So
including the patch seems more of a policy question.

  Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-24  8:19     ` Alexey Dobriyan
@ 2010-03-27  3:14       ` David Miller
  2010-03-31  2:42         ` Goff, Thomas
  2010-03-31  2:43         ` [PATCH] net_sched: minor netns related cleanup Tom Goff
  0 siblings, 2 replies; 12+ messages in thread
From: David Miller @ 2010-03-27  3:14 UTC (permalink / raw)
  To: adobriyan; +Cc: thomas.goff, netdev, adobriyan

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Wed, 24 Mar 2010 10:19:37 +0200

>>> Alexey, can you review Tom's namespace patches in this
>>> set?
> 
> re netns sched patch:
> 
> * in psched_open() PDE(inode)->data isn't needed because
>   it isn't used -- just pass NULL.
> * drop useless trailing return; in psched_net_exit() :^)
> * sch_mirred.c still won't work in netns

Tom, please send a patch to fixup these issues.

Thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-24 14:18     ` [PATCH] netlink: use the appropriate namespace pid Goff, Thomas
@ 2010-03-27  3:15       ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2010-03-27  3:15 UTC (permalink / raw)
  To: Thomas.Goff; +Cc: adobriyan, netdev, adobriyan

From: "Goff, Thomas" <Thomas.Goff@boeing.com>
Date: Wed, 24 Mar 2010 07:18:12 -0700

> On Wed March 24, 2010 12:59 AM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
>> ACK tgid patch, should have sent it myself long ago.
> 
> Thanks for reviewing this.
> 
> David is correct that pid is arbitrary here anyway so it really
> shouldn't matter.  The patch just lets applications that make an
> incorrect assumption that happens to usually be right for the
> initial namespace work similarly in other namespaces.  So
> including the patch seems more of a policy question.

I ended up applying this to net-next-2.6, it's not critical
so it's not net-2.6 material, but it's harmless so we can
still queue it up for the next merge window.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] netlink: use the appropriate namespace pid
  2010-03-27  3:14       ` David Miller
@ 2010-03-31  2:42         ` Goff, Thomas
  2010-03-31  2:43         ` [PATCH] net_sched: minor netns related cleanup Tom Goff
  1 sibling, 0 replies; 12+ messages in thread
From: Goff, Thomas @ 2010-03-31  2:42 UTC (permalink / raw)
  To: David Miller; +Cc: adobriyan, netdev, adobriyan

From: David Miller <mailto:davem@davemloft.net>
Sent: Friday, March 26, 2010 8:14 PM

> > re netns sched patch:
> > 
> > * in psched_open() PDE(inode)->data isn't needed because
> >   it isn't used -- just pass NULL.
> > * drop useless trailing return; in psched_net_exit() :^)
> > * sch_mirred.c still won't work in netns
> 
> Tom, please send a patch to fixup these issues.

Sorry for the delayed response.  A patch I'll send separately
addresses the first two comments.  The act_mirred.c issue is a
little more involved and I'll try to submit a preliminary patch
and request comments later this week.

  Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] net_sched: minor netns related cleanup
  2010-03-27  3:14       ` David Miller
  2010-03-31  2:42         ` Goff, Thomas
@ 2010-03-31  2:43         ` Tom Goff
  2010-03-31  2:45           ` David Miller
  2010-04-02  1:43           ` David Miller
  1 sibling, 2 replies; 12+ messages in thread
From: Tom Goff @ 2010-03-31  2:43 UTC (permalink / raw)
  To: David Miller; +Cc: Alexey Dobriyan, netdev

These changes were suggested by Alexey Dobriyan <adobriyan@gmail.com>:

  - psched_show() does not use any private data so just pass NULL to
    psched_open()

  - remove unnecessary return statement

Signed-off-by: Tom Goff <thomas.goff@boeing.com>
---
 net/sched/sch_api.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 6d6fe16..c65866d 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1683,7 +1683,7 @@ static int psched_show(struct seq_file *seq, void *v)
 
 static int psched_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, psched_show, PDE(inode)->data);
+	return single_open(file, psched_show, NULL);
 }
 
 static const struct file_operations psched_fops = {
@@ -1708,8 +1708,6 @@ static int __net_init psched_net_init(struct net *net)
 static void __net_exit psched_net_exit(struct net *net)
 {
 	proc_net_remove(net, "psched");
-
-	return;
 }
 #else
 static int __net_init psched_net_init(struct net *net)
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] net_sched: minor netns related cleanup
  2010-03-31  2:43         ` [PATCH] net_sched: minor netns related cleanup Tom Goff
@ 2010-03-31  2:45           ` David Miller
  2010-04-02  1:43           ` David Miller
  1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2010-03-31  2:45 UTC (permalink / raw)
  To: thomas.goff; +Cc: adobriyan, netdev

From: Tom Goff <thomas.goff@boeing.com>
Date: Tue, 30 Mar 2010 19:43:54 -0700

> These changes were suggested by Alexey Dobriyan <adobriyan@gmail.com>:
> 
>   - psched_show() does not use any private data so just pass NULL to
>     psched_open()
> 
>   - remove unnecessary return statement
> 
> Signed-off-by: Tom Goff <thomas.goff@boeing.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] net_sched: minor netns related cleanup
  2010-03-31  2:43         ` [PATCH] net_sched: minor netns related cleanup Tom Goff
  2010-03-31  2:45           ` David Miller
@ 2010-04-02  1:43           ` David Miller
  1 sibling, 0 replies; 12+ messages in thread
From: David Miller @ 2010-04-02  1:43 UTC (permalink / raw)
  To: thomas.goff; +Cc: adobriyan, netdev

From: Tom Goff <thomas.goff@boeing.com>
Date: Tue, 30 Mar 2010 19:43:54 -0700

> These changes were suggested by Alexey Dobriyan <adobriyan@gmail.com>:
> 
>   - psched_show() does not use any private data so just pass NULL to
>     psched_open()
> 
>   - remove unnecessary return statement
> 
> Signed-off-by: Tom Goff <thomas.goff@boeing.com>

Applied.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-04-02  1:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-20  1:38 [PATCH] netlink: use the appropriate namespace pid Tom Goff
2010-03-22  4:30 ` David Miller
2010-03-24  7:58   ` Alexey Dobriyan
2010-03-24  8:19     ` Alexey Dobriyan
2010-03-27  3:14       ` David Miller
2010-03-31  2:42         ` Goff, Thomas
2010-03-31  2:43         ` [PATCH] net_sched: minor netns related cleanup Tom Goff
2010-03-31  2:45           ` David Miller
2010-04-02  1:43           ` David Miller
2010-03-24 14:18     ` [PATCH] netlink: use the appropriate namespace pid Goff, Thomas
2010-03-27  3:15       ` David Miller
2010-03-23  3:25 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.