[Devel,RH7,2/2] ve/sysctl/net: allow max_dgram_qlen sysctl in ve init userns

Submitted by Pavel Tikhomirov on March 22, 2017, 4:30 p.m.

Details

Message ID 20170322163002.16881-2-ptikhomirov@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Pavel Tikhomirov March 22, 2017, 4:30 p.m.
it is virtualized and we had it available in VZ6CT, also skbs
in unix socket's queue are accounted in memcg as GFP_KERNEL_ACCOUNT

https://jira.sw.ru/browse/PSBM-54530

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 net/unix/sysctl_net_unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
index b3d5150..464217f 100644
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -35,7 +35,7 @@  int __net_init unix_sysctl_register(struct net *net)
 		goto err_alloc;
 
 	/* Don't export sysctls to unprivileged users */
-	if (net->user_ns != &init_user_ns)
+	if (ve_net_hide_sysctl(net))
 		table[0].procname = NULL;
 
 	table[0].data = &net->unx.sysctl_max_dgram_qlen;

Comments

Kirill Gorkunov March 22, 2017, 7:20 p.m.
On Wed, Mar 22, 2017 at 07:30:02PM +0300, Pavel Tikhomirov wrote:
> it is virtualized and we had it available in VZ6CT, also skbs
> in unix socket's queue are accounted in memcg as GFP_KERNEL_ACCOUNT
> 
> https://jira.sw.ru/browse/PSBM-54530
> 
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>