X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=kernel%2Futsname_sysctl.c;h=3b34b3545936dfcd179eca7f9fd2aebf4a2abfa0;hb=23918b03060f6e572168fdde1798a905679d2e06;hp=c76c06466bfd07fe11fab8a592075ac0a38b807b;hpb=2fe83b3ad12d43799af5f3156886eca443a88bac;p=linux-2.6-omap-h63xx.git diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c index c76c06466bf..3b34b354593 100644 --- a/kernel/utsname_sysctl.c +++ b/kernel/utsname_sysctl.c @@ -12,12 +12,15 @@ #include #include #include -#include #include static void *get_uts(ctl_table *table, int write) { char *which = table->data; + struct uts_namespace *uts_ns; + + uts_ns = current->nsproxy->uts_ns; + which = (which - (char *)&init_uts_ns) + (char *)uts_ns; if (!write) down_read(&uts_sem); @@ -57,7 +60,7 @@ static int proc_do_uts_string(ctl_table *table, int write, struct file *filp, #ifdef CONFIG_SYSCTL_SYSCALL /* The generic string strategy routine: */ -static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, +static int sysctl_uts_string(ctl_table *table, void __user *oldval, size_t __user *oldlenp, void __user *newval, size_t newlen) { @@ -66,8 +69,7 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, write = newval && newlen; memcpy(&uts_table, table, sizeof(uts_table)); uts_table.data = get_uts(table, write); - r = sysctl_string(&uts_table, name, nlen, - oldval, oldlenp, newval, newlen); + r = sysctl_string(&uts_table, oldval, oldlenp, newval, newlen); put_uts(table, write, uts_table.data); return r; }