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

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Mar 22 09:30:02 PDT 2017


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 at virtuozzo.com>
---
 net/unix/sysctl_net_unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.9.3



More information about the Devel mailing list