aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/syscall.c')
-rw-r--r--arch/mips/kernel/syscall.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 2aeaa2fd4b32..5e8a18a8e2bd 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -276,31 +276,9 @@ void sys_set_thread_area(unsigned long addr)
276 276
277asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) 277asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
278{ 278{
279 int tmp, len; 279 int tmp;
280 char __user *name;
281 280
282 switch(cmd) { 281 switch(cmd) {
283 case SETNAME: {
284 char nodename[__NEW_UTS_LEN + 1];
285
286 if (!capable(CAP_SYS_ADMIN))
287 return -EPERM;
288
289 name = (char __user *) arg1;
290
291 len = strncpy_from_user(nodename, name, __NEW_UTS_LEN);
292 if (len < 0)
293 return -EFAULT;
294
295 down_write(&uts_sem);
296 strncpy(system_utsname.nodename, nodename, len);
297 nodename[__NEW_UTS_LEN] = '\0';
298 strlcpy(system_utsname.nodename, nodename,
299 sizeof(system_utsname.nodename));
300 up_write(&uts_sem);
301 return 0;
302 }
303
304 case MIPS_ATOMIC_SET: 282 case MIPS_ATOMIC_SET:
305 printk(KERN_CRIT "How did I get here?\n"); 283 printk(KERN_CRIT "How did I get here?\n");
306 return -EINVAL; 284 return -EINVAL;
@@ -313,9 +291,6 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)
313 case FLUSH_CACHE: 291 case FLUSH_CACHE:
314 __flush_cache_all(); 292 __flush_cache_all();
315 return 0; 293 return 0;
316
317 case MIPS_RDNVRAM:
318 return -EIO;
319 } 294 }
320 295
321 return -EINVAL; 296 return -EINVAL;