netlink: use the appropriate namespace pid
Subsystems (3)
PATCH 1/1 netlink: use the appropriate namespace pid
This was included in OpenVZ kernels but wasn't integrated upstream.
Quoted 1 line
From
git://git.openvz.org/pub/linux-2.6.24-openvz:
commit 5c69402f18adf7276352e051ece2cf31feefab02 Author: Alexey Dobriyan <[email protected]> Date: Mon Dec 24 14:37:45 2007 +0300 netlink: fixup ->tgid to work in multiple PID namespaces
--- net/netlink/af_netlink.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/netlink/af_netlink.c +1 -1
@@ -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 ;
Signature · 1 line
1.6.3.3
David Miller
maintainerFrom: Tom Goff <[email protected]>
Date: Fri, 19 Mar 2010 18:38:50 -0700
Quoted 10 lines
This was included in OpenVZ kernels but wasn't integrated upstream.
Quoted 1 line
From
git://git.openvz.org/pub/linux-2.6.24-openvz:commit 5c69402f18adf7276352e051ece2cf31feefab02 Author: Alexey Dobriyan <[email protected]> Date: Mon Dec 24 14:37:45 2007 +0300 netlink: fixup ->tgid to work in multiple PID namespacesSigned-off-by Tom Goff <[email protected]>
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!
Quoted 14 lines · David Miller
From: Tom Goff <[email protected]>
Date: Fri, 19 Mar 2010 18:38:50 -0700Quoted 10 lines
This was included in OpenVZ kernels but wasn't integrated upstream.
Quoted 1 line
From
git://git.openvz.org/pub/linux-2.6.24-openvz:commit
5c69402f18adf7276352e051ece2cf31feefab02
Author: Alexey Dobriyan <[email protected]>
Date: Mon Dec 24 14:37:45 2007 +0300netlink: fixup ->tgid to work in multiple PID namespaces
Signed-off-by Tom Goff <[email protected]>
Quoted 7 lines
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.
Quoted 2 lines
Quoted 2 lines
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
David Miller
maintainerFrom: Alexey Dobriyan <[email protected]>
Date: Wed, 24 Mar 2010 10:19:37 +0200
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
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; inpsched_net_exit():^)
*sch_mirred.cstill won't work in netns
Tom, please send a patch to fixup these issues.
Thanks.
From: David Miller <mailto:[email protected]>
Sent: Friday, March 26, 2010 8:14 PM
Quoted 8 lines
Quoted 6 lines
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; inpsched_net_exit():^)
*sch_mirred.cstill won't work in netnsTom, 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
PATCH 1/1 net_sched: minor netns related cleanup
In reply to David MillerThese changes were suggested by Alexey Dobriyan <[email protected]>:
- psched_show() does not use any private data so just pass NULL to psched_open()
- remove unnecessary return statement
--- net/sched/sch_api.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
net/sched/sch_api.c +1 -3
@@ -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)
Signature · 1 line
1.6.3.3
Re: [PATCH] net_sched: minor netns related cleanup
From: Tom Goff <[email protected]>
Date: Tue, 30 Mar 2010 19:43:54 -0700
Quoted 8 lines
These changes were suggested by Alexey Dobriyan <[email protected]>:
-
psched_show()does not use any private data so just pass NULL topsched_open()- remove unnecessary return statement
Signed-off-by Tom Goff <[email protected]>
Applied, thanks.
Re: [PATCH] net_sched: minor netns related cleanup
In reply to Tom GoffFrom: Tom Goff <[email protected]>
Date: Tue, 30 Mar 2010 19:43:54 -0700
Quoted 8 lines
These changes were suggested by Alexey Dobriyan <[email protected]>:
-
psched_show()does not use any private data so just pass NULL topsched_open()- remove unnecessary return statement
Signed-off-by Tom Goff <[email protected]>
Applied.
Quoted 1 line · Alexey Dobriyan
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
David Miller
maintainerFrom: "Goff, Thomas" <[email protected]>
Date: Wed, 24 Mar 2010 07:18:12 -0700
Quoted 10 lines · Alexey Dobriyan
Quoted 1 line
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.
David Miller
maintainerFrom: Tom Goff <[email protected]>
Date: Fri, 19 Mar 2010 18:38:50 -0700
Quoted 10 lines
This was included in OpenVZ kernels but wasn't integrated upstream.
Quoted 1 line
From
git://git.openvz.org/pub/linux-2.6.24-openvz:commit 5c69402f18adf7276352e051ece2cf31feefab02 Author: Alexey Dobriyan <[email protected]> Date: Mon Dec 24 14:37:45 2007 +0300 netlink: fixup ->tgid to work in multiple PID namespacesSigned-off-by Tom Goff <[email protected]>
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.