git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
x86_64
/
lib
/
usercopy.c
diff --git
a/arch/x86_64/lib/usercopy.c
b/arch/x86_64/lib/usercopy.c
index
db8abba
..
9bc2c29
100644
(file)
--- a/
arch/x86_64/lib/usercopy.c
+++ b/
arch/x86_64/lib/usercopy.c
@@
-109,14
+109,11
@@
unsigned long clear_user(void __user *to, unsigned long n)
* Return 0 on exception, a value greater than N if too long
*/
* Return 0 on exception, a value greater than N if too long
*/
-long strnlen_user(const char __user *s, long n)
+long
__
strnlen_user(const char __user *s, long n)
{
long res = 0;
char c;
{
long res = 0;
char c;
- if (!access_ok(VERIFY_READ, s, n))
- return 0;
-
while (1) {
if (res>n)
return n+1;
while (1) {
if (res>n)
return n+1;
@@
-129,6
+126,13
@@
long strnlen_user(const char __user *s, long n)
}
}
}
}
+long strnlen_user(const char __user *s, long n)
+{
+ if (!access_ok(VERIFY_READ, s, n))
+ return 0;
+ return __strnlen_user(s, n);
+}
+
long strlen_user(const char __user *s)
{
long res = 0;
long strlen_user(const char __user *s)
{
long res = 0;