Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154005
b: refs/heads/master
c: a9ede5b
h: refs/heads/master
i:
  154003: 22dc51a
v: v3
  • Loading branch information
Mike Frysinger authored and Arnd Bergmann committed Jun 19, 2009
1 parent d2234ee commit 8e62033
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9844813f226f6d07e1544e915529cb88f4fcb868
refs/heads/master: a9ede5b355aabd667ed690f858c925a23927027b
12 changes: 6 additions & 6 deletions trunk/include/asm-generic/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static inline __must_check long __copy_to_user(void __user *to,
#define put_user(x, ptr) \
({ \
might_sleep(); \
__access_ok(ptr, sizeof (*ptr)) ? \
access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \
__put_user(x, ptr) : \
-EFAULT; \
})
Expand Down Expand Up @@ -219,7 +219,7 @@ extern int __put_user_bad(void) __attribute__((noreturn));
#define get_user(x, ptr) \
({ \
might_sleep(); \
__access_ok(ptr, sizeof (*ptr)) ? \
access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ? \
__get_user(x, ptr) : \
-EFAULT; \
})
Expand All @@ -244,7 +244,7 @@ static inline long copy_from_user(void *to,
const void __user * from, unsigned long n)
{
might_sleep();
if (__access_ok(from, n))
if (access_ok(VERIFY_READ, from, n))
return __copy_from_user(to, from, n);
else
return n;
Expand All @@ -254,7 +254,7 @@ static inline long copy_to_user(void __user *to,
const void *from, unsigned long n)
{
might_sleep();
if (__access_ok(to, n))
if (access_ok(VERIFY_WRITE, to, n))
return __copy_to_user(to, from, n);
else
return n;
Expand All @@ -278,7 +278,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count)
static inline long
strncpy_from_user(char *dst, const char __user *src, long count)
{
if (!__access_ok(src, 1))
if (!access_ok(VERIFY_READ, src, 1))
return -EFAULT;
return __strncpy_from_user(dst, src, count);
}
Expand Down Expand Up @@ -318,7 +318,7 @@ static inline __must_check unsigned long
clear_user(void __user *to, unsigned long n)
{
might_sleep();
if (!__access_ok(to, n))
if (!access_ok(VERIFY_WRITE, to, n))
return n;

return __clear_user(to, n);
Expand Down

0 comments on commit 8e62033

Please sign in to comment.