aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/sys_i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/sys_i386.c')
-rw-r--r--arch/i386/kernel/sys_i386.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c
index 8fdb1fb17a5f..dc6e3bbeba31 100644
--- a/arch/i386/kernel/sys_i386.c
+++ b/arch/i386/kernel/sys_i386.c
@@ -210,7 +210,7 @@ asmlinkage int sys_uname(struct old_utsname __user * name)
210 if (!name) 210 if (!name)
211 return -EFAULT; 211 return -EFAULT;
212 down_read(&uts_sem); 212 down_read(&uts_sem);
213 err=copy_to_user(name, &system_utsname, sizeof (*name)); 213 err = copy_to_user(name, utsname(), sizeof (*name));
214 up_read(&uts_sem); 214 up_read(&uts_sem);
215 return err?-EFAULT:0; 215 return err?-EFAULT:0;
216} 216}
@@ -226,16 +226,21 @@ asmlinkage int sys_olduname(struct oldold_utsname __user * name)
226 226
227 down_read(&uts_sem); 227 down_read(&uts_sem);
228 228
229 error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); 229 error = __copy_to_user(&name->sysname, &utsname()->sysname,
230 error |= __put_user(0,name->sysname+__OLD_UTS_LEN); 230 __OLD_UTS_LEN);
231 error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); 231 error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
232 error |= __put_user(0,name->nodename+__OLD_UTS_LEN); 232 error |= __copy_to_user(&name->nodename, &utsname()->nodename,
233 error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); 233 __OLD_UTS_LEN);
234 error |= __put_user(0,name->release+__OLD_UTS_LEN); 234 error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
235 error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); 235 error |= __copy_to_user(&name->release, &utsname()->release,
236 error |= __put_user(0,name->version+__OLD_UTS_LEN); 236 __OLD_UTS_LEN);
237 error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); 237 error |= __put_user(0, name->release + __OLD_UTS_LEN);
238 error |= __put_user(0,name->machine+__OLD_UTS_LEN); 238 error |= __copy_to_user(&name->version, &utsname()->version,
239 __OLD_UTS_LEN);
240 error |= __put_user(0, name->version + __OLD_UTS_LEN);
241 error |= __copy_to_user(&name->machine, &utsname()->machine,
242 __OLD_UTS_LEN);
243 error |= __put_user(0, name->machine + __OLD_UTS_LEN);
239 244
240 up_read(&uts_sem); 245 up_read(&uts_sem);
241 246