summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/sys_arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/sys_arm.c')
-rw-r--r--arch/arm/kernel/sys_arm.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index ab514903d..ba0d4eda2 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -30,8 +30,6 @@
*/
/* proc/system.h */
const char xchg_str[] = "xchg";
-/* arch/dma.h */
-const char dma_str[] = "%s: dma %d not supported\n";
/*
* sys_pipe() is the normal C calling standard for creating
@@ -241,7 +239,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, struct
lock_kernel();
if (!newsp)
newsp = regs->ARM_sp;
-
ret = do_fork(clone_flags, newsp, regs);
unlock_kernel();
return ret;
@@ -311,16 +308,20 @@ sys_compat_mount (char *devname, char *dirname, char *type, unsigned long flags,
asmlinkage int sys_uname (struct old_utsname * name)
{
static int warned = 0;
-
+ int err;
+
if (warned == 0) {
warned ++;
printk (KERN_NOTICE "%s (%d): obsolete uname call\n",
current->comm, current->pid);
}
- if (name && !copy_to_user (name, &system_utsname, sizeof (*name)))
- return 0;
- return -EFAULT;
+ if(!name)
+ return -EFAULT;
+ down(&uts_sem);
+ err=copy_to_user (name, &system_utsname, sizeof (*name));
+ up(&uts_sem);
+ return err?-EFAULT:0;
}
asmlinkage int sys_olduname(struct oldold_utsname * name)
@@ -340,6 +341,8 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
return -EFAULT;
+ down(&uts_sem);
+
error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
error -= __put_user(0,name->sysname+__OLD_UTS_LEN);
error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
@@ -350,6 +353,9 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
error -= __put_user(0,name->version+__OLD_UTS_LEN);
error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
error -= __put_user(0,name->machine+__OLD_UTS_LEN);
+
+ up(&uts_sem);
+
error = error ? -EFAULT : 0;
return error;