Re: 2.6.17-rc5-mm2

From: Andrew Morton
Date: Fri Jun 02 2006 - 01:11:02 EST


On Fri, 2 Jun 2006 12:23:11 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> On ia64 + make allmodconfig
>
> CC kernel/sysctl.o
> kernel/sysctl.c:305: error: braced-group within expression allowed only inside a function
> kernel/sysctl.c:314: warning: type defaults to `int' in declaration of `ia64_intri_res'
> kernel/sysctl.c:314: warning: data definition has no type or storage class
> kernel/sysctl.c:314: error: syntax error before '}' token
> kernel/sysctl.c:323: warning: type defaults to `int' in declaration of `ia64_intri_res'
> kernel/sysctl.c:323: warning: data definition has no type or storage class
> kernel/sysctl.c:323: error: syntax error before '}' token
> kernel/sysctl.c:332: warning: type defaults to `int' in declaration of `ia64_intri_res'
> kernel/sysctl.c:332: warning: data definition has no type or storage class
> kernel/sysctl.c:332: error: syntax error before '}' token
> kernel/sysctl.c:341: warning: type defaults to `int' in declaration of `ia64_intri_res'
> kernel/sysctl.c:341: warning: data definition has no type or storage class
> kernel/sysctl.c:341: error: syntax error before '}' token
> kernel/sysctl.c:98: warning: 'ngroups_max' defined but not used
> kernel/sysctl.c:1810: warning: 'proc_do_utsns_string' defined but not used

yup, thanks.


From: Andrew Morton <akpm@xxxxxxxx>

Don't try to evaluate `current' at compile time - ia64 explodes.

Cc: Sam Vilain <sam.vilain@xxxxxxxxxxxxxxx>
Cc: Serge E. Hallyn <serue@xxxxxxxxxx>
Cc: Kirill Korotaev <dev@xxxxxxxxxx>
Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Cc: Herbert Poetzl <herbert@xxxxxxxxxxxx>
Cc: Andrey Savochkin <saw@xxxxx>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

kernel/sysctl.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff -puN kernel/sysctl.c~namespaces-utsname-sysctl-hack-cleanup-2-fix kernel/sysctl.c
--- 25/kernel/sysctl.c~namespaces-utsname-sysctl-hack-cleanup-2-fix Fri Jun 2 12:43:07 2006
+++ 25-akpm/kernel/sysctl.c Fri Jun 2 12:45:35 2006
@@ -302,7 +302,7 @@ static ctl_table kern_table[] = {
.procname = "ostype",
.data = NULL,
/* could maybe use __NEW_UTS_LEN here? */
- .maxlen = sizeof(current->nsproxy->uts_ns->name.sysname),
+ .maxlen = FIELD_SIZEOF(struct new_utsname, sysname),
.mode = 0444,
.proc_handler = &proc_do_utsns_string,
.strategy = &sysctl_string,
@@ -311,7 +311,7 @@ static ctl_table kern_table[] = {
.ctl_name = KERN_OSRELEASE,
.procname = "osrelease",
.data = NULL,
- .maxlen = sizeof(current->nsproxy->uts_ns->name.release),
+ .maxlen = FIELD_SIZEOF(struct new_utsname, release),
.mode = 0444,
.proc_handler = &proc_do_utsns_string,
.strategy = &sysctl_string,
@@ -320,7 +320,7 @@ static ctl_table kern_table[] = {
.ctl_name = KERN_VERSION,
.procname = "version",
.data = NULL,
- .maxlen = sizeof(current->nsproxy->uts_ns->name.version),
+ .maxlen = FIELD_SIZEOF(struct new_utsname, version),
.mode = 0444,
.proc_handler = &proc_do_utsns_string,
.strategy = &sysctl_string,
@@ -329,7 +329,7 @@ static ctl_table kern_table[] = {
.ctl_name = KERN_NODENAME,
.procname = "hostname",
.data = NULL,
- .maxlen = sizeof(current->nsproxy->uts_ns->name.nodename),
+ .maxlen = FIELD_SIZEOF(struct new_utsname, nodename),
.mode = 0644,
.proc_handler = &proc_do_utsns_string,
.strategy = &sysctl_string,
@@ -338,7 +338,7 @@ static ctl_table kern_table[] = {
.ctl_name = KERN_DOMAINNAME,
.procname = "domainname",
.data = NULL,
- .maxlen = sizeof(current->nsproxy->uts_ns->name.domainname),
+ .maxlen = FIELD_SIZEOF(struct new_utsname, domainname),
.mode = 0644,
.proc_handler = &proc_do_utsns_string,
.strategy = &sysctl_string,
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/