Re: [PATCH] netlink: switch net_ns only if net is not init_net

2014-03-09 Thread Gu Zheng
On 03/10/2014 07:09 AM, David Miller wrote: > From: Gu Zheng > Date: Fri, 07 Mar 2014 18:47:30 +0800 > >> Many netlink users create netlink sock in the init_net, and the >> switching nes_ns(init_net-->net) is needless in this case. So here >> we add a pre-check to avoid this. >> >>

Re: [PATCH] netlink: switch net_ns only if net is not init_net

2014-03-09 Thread David Miller
From: Gu Zheng Date: Fri, 07 Mar 2014 18:47:30 +0800 > Many netlink users create netlink sock in the init_net, and the > switching nes_ns(init_net-->net) is needless in this case. So here > we add a pre-check to avoid this. > > Signed-off-by: Gu Zheng This check is more appropriately placed

Re: [PATCH] netlink: switch net_ns only if net is not init_net

2014-03-09 Thread David Miller
From: Gu Zheng guz.f...@cn.fujitsu.com Date: Fri, 07 Mar 2014 18:47:30 +0800 Many netlink users create netlink sock in the init_net, and the switching nes_ns(init_net--net) is needless in this case. So here we add a pre-check to avoid this. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com

Re: [PATCH] netlink: switch net_ns only if net is not init_net

2014-03-09 Thread Gu Zheng
On 03/10/2014 07:09 AM, David Miller wrote: From: Gu Zheng guz.f...@cn.fujitsu.com Date: Fri, 07 Mar 2014 18:47:30 +0800 Many netlink users create netlink sock in the init_net, and the switching nes_ns(init_net--net) is needless in this case. So here we add a pre-check to avoid this.

[PATCH] netlink: switch net_ns only if net is not init_net

2014-03-07 Thread Gu Zheng
Many netlink users create netlink sock in the init_net, and the switching nes_ns(init_net-->net) is needless in this case. So here we add a pre-check to avoid this. Signed-off-by: Gu Zheng --- net/netlink/af_netlink.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[PATCH] netlink: switch net_ns only if net is not init_net

2014-03-07 Thread Gu Zheng
Many netlink users create netlink sock in the init_net, and the switching nes_ns(init_net--net) is needless in this case. So here we add a pre-check to avoid this. Signed-off-by: Gu Zheng guz.f...@cn.fujitsu.com --- net/netlink/af_netlink.c |3 ++- 1 files changed, 2 insertions(+), 1