aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-03-05 16:42:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:27 -0500
commit77079dbec721a282bf0931385ae10d77cdbac5af (patch)
tree7e3a0e3fe650a99b3c245ae6a951c74bf07ec211 /arch
parent6822190882ce02ae8ae135026c2b3f17c006960b (diff)
alpha: PTR_ERR overwrites -EINVAL in syscall osf_mount
The initial -EINVAL value is overwritten by `retval = PTR_ERR(name)'. If this isn't an error pointer and typenr is not 1, 6 or 9, then this retval, a pointer cast to a long, is returned. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/osf_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 62619f25132f..53c213f70fcb 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -361,7 +361,7 @@ osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags)
361SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, char __user *, path, 361SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, char __user *, path,
362 int, flag, void __user *, data) 362 int, flag, void __user *, data)
363{ 363{
364 int retval = -EINVAL; 364 int retval;
365 char *name; 365 char *name;
366 366
367 name = getname(path); 367 name = getname(path);
@@ -379,6 +379,7 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, char __user *, path,
379 retval = osf_procfs_mount(name, data, flag); 379 retval = osf_procfs_mount(name, data, flag);
380 break; 380 break;
381 default: 381 default:
382 retval = -EINVAL;
382 printk("osf_mount(%ld, %x)\n", typenr, flag); 383 printk("osf_mount(%ld, %x)\n", typenr, flag);
383 } 384 }
384 putname(name); 385 putname(name);