Messages in this thread Patch in this message | | | Date | Sun, 9 Jul 2006 13:52:28 -0500 | From | "Serge E. Hallyn" <> | Subject | Re: 2.6.17-mm6: kernel/sysctl.c: PROC_FS=n compile error |
| |
Quoting Adrian Bunk (bunk@stusta.de): > namespaces-utsname-sysctl-hack.patch and ipc-namespace-sysctls.patch > cause the following compile error with CONFIG_PROC_FS=n: > > <-- snip --> > > ... > CC kernel/sysctl.o > kernel/sysctl.c:107: warning: #proc_do_ipc_string# used but never defined > kernel/sysctl.c:150: warning: #proc_do_utsns_string# used but never defined > kernel/sysctl.c:2465: warning: #proc_do_uts_string# defined but not used > ... > LD .tmp_vmlinux1 > kernel/built-in.o:(.data+0x938): undefined reference to `proc_do_utsns_string' > kernel/built-in.o:(.data+0x964): undefined reference to `proc_do_utsns_string' > kernel/built-in.o:(.data+0x990): undefined reference to `proc_do_utsns_string' > kernel/built-in.o:(.data+0x9bc): undefined reference to `proc_do_utsns_string' > kernel/built-in.o:(.data+0x9e8): undefined reference to `proc_do_utsns_string' > kernel/built-in.o:(.data+0xc24): undefined reference to `proc_do_ipc_string' > kernel/built-in.o:(.data+0xc50): undefined reference to `proc_do_ipc_string' > kernel/built-in.o:(.data+0xc7c): undefined reference to `proc_do_ipc_string' > kernel/built-in.o:(.data+0xca8): undefined reference to `proc_do_ipc_string' > kernel/built-in.o:(.data+0xcd4): undefined reference to `proc_do_ipc_string' > kernel/built-in.o:(.data+0xd00): more undefined references to `proc_do_ipc_string' follow > make: *** [.tmp_vmlinux1] Error 1
Does the below patch fix this for you? Took me awhile to get a valid CONFIG_PROC_FS=n .config, and I'm having other -mm s390 build failures which I'll look into tomorrow, but this seems to fix the problem.
thanks, -serge
From: Serge Hallyn <serue@us.ibm.com> Subject: [PATCH] namespaces: fix compilation when !CONFIG_PROC_FS
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@us.ibm.com>
---
kernel/sysctl.c | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-)
488d4b4675744109a40f5a0a7d73075176cd281a diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 5c4d19d..11e71c3 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -142,13 +142,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 = @@ -291,7 +286,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, }, { @@ -300,7 +295,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, }, { @@ -309,7 +304,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, }, { @@ -318,7 +313,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, }, { @@ -327,7 +322,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 */ @@ -1791,7 +1786,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; @@ -2461,11 +2456,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) { -- 1.1.6 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |