projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6822190
)
alpha: PTR_ERR overwrites -EINVAL in syscall osf_mount
author
Roel Kluin
<
[email protected]
>
Fri, 5 Mar 2010 21:42:28 +0000
(13:42 -0800)
committer
Linus Torvalds
<
[email protected]
>
Sat, 6 Mar 2010 19:26:27 +0000
(11:26 -0800)
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 <
[email protected]
>
Acked-by: Richard Henderson <
[email protected]
>
Cc: Ivan Kokshaysky <
[email protected]
>
Cc: Matt Turner <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/alpha/kernel/osf_sys.c
patch
|
blob
|
history
diff --git
a/arch/alpha/kernel/osf_sys.c
b/arch/alpha/kernel/osf_sys.c
index 62619f25132f93018d3a7850dda6c91aee5d0eb2..53c213f70fcbc8151b42fea8b50998bf509e5fea 100644
(file)
--- 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)
SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, char __user *, path,
int, flag, void __user *, data)
{
- int retval
= -EINVAL
;
+ int retval;
char *name;
name = getname(path);
@@
-379,6
+379,7
@@
SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, char __user *, path,
retval = osf_procfs_mount(name, data, flag);
break;
default:
+ retval = -EINVAL;
printk("osf_mount(%ld, %x)\n", typenr, flag);
}
putname(name);