[Devel] [PATCH RHEL7 COMMIT] ve/sysctl/net: allow "net.unix.max_dgram_qlen" sysctl in CT init userns

Konstantin Khorenko khorenko at virtuozzo.com
Fri Mar 24 05:24:24 PDT 2017


The commit is pushed to "branch-rh7-3.10.0-514.10.2.vz7.29.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.10.2.vz7.29.6
------>
commit 95d91cc59dbdffb0e4d98326820672bd055a3ee1
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Fri Mar 24 16:24:23 2017 +0400

    ve/sysctl/net: allow "net.unix.max_dgram_qlen" sysctl in CT init userns
    
    The sysctl is virtualized and we had it available in VZ6 CT, also skbs
    in unix socket's queue are accounted in memcg as GFP_KERNEL_ACCOUNT.
    
    With default sysctl value (10), messages from systemd journald could miss
    syslog log.
    
    https://jira.sw.ru/browse/PSBM-54530
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    Reviewed-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 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;


More information about the Devel mailing list