+ namespaces-utsname-sysctl-hack-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     namespaces: fix compilation when !CONFIG_PROC_FS

has been added to the -mm tree.  Its filename is

     namespaces-utsname-sysctl-hack-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: namespaces: fix compilation when !CONFIG_PROC_FS
From: "Serge E. Hallyn" <serue@xxxxxxxxxx>

The proc_do_uts_string function was misnamed when !CONFIG_PROC_FS.  The
proc_do_ipc_string function was not defined if !CONFIG_PROC_FS.

Signed-off-by: Serge Hallyn <serue@xxxxxxxxxx>
Cc: Adrian Bunk <bunk@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/sysctl.c |   27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff -puN kernel/sysctl.c~namespaces-utsname-sysctl-hack-fix kernel/sysctl.c
--- a/kernel/sysctl.c~namespaces-utsname-sysctl-hack-fix
+++ a/kernel/sysctl.c
@@ -140,13 +140,8 @@ extern int max_lock_depth;
 
 static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t,
 		       ctl_table *, void **);
-#ifndef CONFIG_UTS_NS
 static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
 		  void __user *buffer, size_t *lenp, loff_t *ppos);
-#else
-static int proc_do_utsns_string(ctl_table *table, int write, struct file *filp,
-		  void __user *buffer, size_t *lenp, loff_t *ppos);
-#endif
 
 static ctl_table root_table[];
 static struct ctl_table_header root_table_header =
@@ -289,7 +284,7 @@ static ctl_table kern_table[] = {
 		/* could maybe use __NEW_UTS_LEN here? */
 		.maxlen		= FIELD_SIZEOF(struct new_utsname, sysname),
 		.mode		= 0444,
-		.proc_handler	= &proc_do_utsns_string,
+		.proc_handler	= &proc_do_uts_string,
 		.strategy	= &sysctl_string,
 	},
 	{
@@ -298,7 +293,7 @@ static ctl_table kern_table[] = {
 		.data		= NULL,
 		.maxlen		= FIELD_SIZEOF(struct new_utsname, release),
 		.mode		= 0444,
-		.proc_handler	= &proc_do_utsns_string,
+		.proc_handler	= &proc_do_uts_string,
 		.strategy	= &sysctl_string,
 	},
 	{
@@ -307,7 +302,7 @@ static ctl_table kern_table[] = {
 		.data		= NULL,
 		.maxlen		= FIELD_SIZEOF(struct new_utsname, version),
 		.mode		= 0444,
-		.proc_handler	= &proc_do_utsns_string,
+		.proc_handler	= &proc_do_uts_string,
 		.strategy	= &sysctl_string,
 	},
 	{
@@ -316,7 +311,7 @@ static ctl_table kern_table[] = {
 		.data		= NULL,
 		.maxlen		= FIELD_SIZEOF(struct new_utsname, nodename),
 		.mode		= 0644,
-		.proc_handler	= &proc_do_utsns_string,
+		.proc_handler	= &proc_do_uts_string,
 		.strategy	= &sysctl_string,
 	},
 	{
@@ -325,7 +320,7 @@ static ctl_table kern_table[] = {
 		.data		= NULL,
 		.maxlen		= FIELD_SIZEOF(struct new_utsname, domainname),
 		.mode		= 0644,
-		.proc_handler	= &proc_do_utsns_string,
+		.proc_handler	= &proc_do_uts_string,
 		.strategy	= &sysctl_string,
 	},
 #endif /* !CONFIG_UTS_NS */
@@ -1759,7 +1754,7 @@ static int proc_do_uts_string(ctl_table 
 	return r;
 }
 #else /* !CONFIG_UTS_NS */
-static int proc_do_utsns_string(ctl_table *table, int write, struct file *filp,
+static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
 		  void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	int r;
@@ -2364,11 +2359,19 @@ int proc_dostring(ctl_table *table, int 
 }
 
 static int proc_do_uts_string(ctl_table *table, int write, struct file *filp,
-			    void __user *buffer, size_t *lenp, loff_t *ppos)
+		void __user *buffer, size_t *lenp, loff_t *ppos)
 {
 	return -ENOSYS;
 }
 
+#ifdef CONFIG_SYSVIPC
+static int proc_do_ipc_string(ctl_table *table, int write, struct file *filp,
+		void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	return -ENOSYS;
+}
+#endif
+
 int proc_dointvec(ctl_table *table, int write, struct file *filp,
 		  void __user *buffer, size_t *lenp, loff_t *ppos)
 {
_

Patches currently in -mm which might be from serue@xxxxxxxxxx are

s390-move-var-declarations-behind-ifdef.patch
proc-sysctl-add-_proc_do_string-helper.patch
namespaces-add-nsproxy.patch
namespaces-add-nsproxy-dont-include-compileh.patch
namespaces-incorporate-fs-namespace-into-nsproxy.patch
namespaces-utsname-introduce-temporary-helpers.patch
namespaces-utsname-switch-to-using-uts-namespaces.patch
namespaces-utsname-use-init_utsname-when-appropriate.patch
namespaces-utsname-implement-utsname-namespaces.patch
namespaces-utsname-sysctl-hack.patch
namespaces-utsname-sysctl-hack-fix.patch
namespaces-utsname-remove-system_utsname.patch
namespaces-utsname-implement-clone_newuts-flag.patch
uts-copy-nsproxy-only-when-needed.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux