aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/syscalls.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index 9b69d99a9103..d358866b880f 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -260,7 +260,7 @@ long ppc_newuname(struct new_utsname __user * name)
260 int err = 0; 260 int err = 0;
261 261
262 down_read(&uts_sem); 262 down_read(&uts_sem);
263 if (copy_to_user(name, &system_utsname, sizeof(*name))) 263 if (copy_to_user(name, utsname(), sizeof(*name)))
264 err = -EFAULT; 264 err = -EFAULT;
265 up_read(&uts_sem); 265 up_read(&uts_sem);
266 if (!err) 266 if (!err)
@@ -273,7 +273,7 @@ int sys_uname(struct old_utsname __user *name)
273 int err = 0; 273 int err = 0;
274 274
275 down_read(&uts_sem); 275 down_read(&uts_sem);
276 if (copy_to_user(name, &system_utsname, sizeof(*name))) 276 if (copy_to_user(name, utsname(), sizeof(*name)))
277 err = -EFAULT; 277 err = -EFAULT;
278 up_read(&uts_sem); 278 up_read(&uts_sem);
279 if (!err) 279 if (!err)
@@ -289,19 +289,19 @@ int sys_olduname(struct oldold_utsname __user *name)
289 return -EFAULT; 289 return -EFAULT;
290 290
291 down_read(&uts_sem); 291 down_read(&uts_sem);
292 error = __copy_to_user(&name->sysname, &system_utsname.sysname, 292 error = __copy_to_user(&name->sysname, &utsname()->sysname,
293 __OLD_UTS_LEN); 293 __OLD_UTS_LEN);
294 error |= __put_user(0, name->sysname + __OLD_UTS_LEN); 294 error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
295 error |= __copy_to_user(&name->nodename, &system_utsname.nodename, 295 error |= __copy_to_user(&name->nodename, &utsname()->nodename,
296 __OLD_UTS_LEN); 296 __OLD_UTS_LEN);
297 error |= __put_user(0, name->nodename + __OLD_UTS_LEN); 297 error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
298 error |= __copy_to_user(&name->release, &system_utsname.release, 298 error |= __copy_to_user(&name->release, &utsname()->release,
299 __OLD_UTS_LEN); 299 __OLD_UTS_LEN);
300 error |= __put_user(0, name->release + __OLD_UTS_LEN); 300 error |= __put_user(0, name->release + __OLD_UTS_LEN);
301 error |= __copy_to_user(&name->version, &system_utsname.version, 301 error |= __copy_to_user(&name->version, &utsname()->version,
302 __OLD_UTS_LEN); 302 __OLD_UTS_LEN);
303 error |= __put_user(0, name->version + __OLD_UTS_LEN); 303 error |= __put_user(0, name->version + __OLD_UTS_LEN);
304 error |= __copy_to_user(&name->machine, &system_utsname.machine, 304 error |= __copy_to_user(&name->machine, &utsname()->machine,
305 __OLD_UTS_LEN); 305 __OLD_UTS_LEN);
306 error |= override_machine(name->machine); 306 error |= override_machine(name->machine);
307 up_read(&uts_sem); 307 up_read(&uts_sem);