OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] utsns: Restore proper namespace handling.
[PATCH] utsns: Restore proper namespace handling. [message #23738] Fri, 23 November 2007 19:25 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
When CONFIG_UTS_NS was removed it seems that we also deleted
the code for handling sysctls in the other then the initial
uts namespace.   This patch restores that code.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 kernel/utsname_sysctl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index c76c064..71f58c3 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -18,6 +18,8 @@
 static void *get_uts(ctl_table *table, int write)
 {
 	char *which = table->data;
+	struct uts_namespace *uts_ns = current->nsproxy->uts_ns;
+	which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
 
 	if (!write)
 		down_read(&uts_sem);
-- 
1.5.3.rc6.17.g1911

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH][BRIDGE] Properly dereference the br_should_route_hook
Next Topic: [patch -mm 1/4] mqueue namespace : add struct mq_namespace
Goto Forum:
  


Current Time: Sun Jul 06 11:03:23 GMT 2025

Total time taken to generate the page: 0.02669 seconds