From: "Serge E. Hallyn" 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 Cc: Adrian Bunk Signed-off-by: Andrew Morton --- 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 @@ -143,13 +143,8 @@ static int parse_table(int __user *, int void __user *, size_t, ctl_table *, void **); #endif -#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 = @@ -292,7 +287,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, }, { @@ -301,7 +296,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, }, { @@ -310,7 +305,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, }, { @@ -319,7 +314,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, }, { @@ -328,7 +323,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 */ @@ -1787,7 +1782,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; @@ -2392,11 +2387,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) { _