aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/sys_sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/sys_sh.c')
-rw-r--r--arch/sh/kernel/sys_sh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 9061b86d73fa..0dfb88925add 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -23,6 +23,7 @@
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/ipc.h> 24#include <linux/ipc.h>
25#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
26#include <asm/syscalls.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27#include <asm/unistd.h> 28#include <asm/unistd.h>
28 29
@@ -186,7 +187,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
186 union semun fourth; 187 union semun fourth;
187 if (!ptr) 188 if (!ptr)
188 return -EINVAL; 189 return -EINVAL;
189 if (get_user(fourth.__pad, (void * __user *) ptr)) 190 if (get_user(fourth.__pad, (void __user * __user *) ptr))
190 return -EFAULT; 191 return -EFAULT;
191 return sys_semctl (first, second, third, fourth); 192 return sys_semctl (first, second, third, fourth);
192 } 193 }
@@ -261,13 +262,13 @@ asmlinkage int sys_ipc(uint call, int first, int second,
261 return -EINVAL; 262 return -EINVAL;
262} 263}
263 264
264asmlinkage int sys_uname(struct old_utsname * name) 265asmlinkage int sys_uname(struct old_utsname __user *name)
265{ 266{
266 int err; 267 int err;
267 if (!name) 268 if (!name)
268 return -EFAULT; 269 return -EFAULT;
269 down_read(&uts_sem); 270 down_read(&uts_sem);
270 err = copy_to_user(name, utsname(), sizeof (*name)); 271 err = copy_to_user(name, utsname(), sizeof(*name));
271 up_read(&uts_sem); 272 up_read(&uts_sem);
272 return err?-EFAULT:0; 273 return err?-EFAULT:0;
273} 274}