Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360121
b: refs/heads/master
c: 05d88a4
h: refs/heads/master
i:
  360119: 9170256
v: v3
  • Loading branch information
Vineet Gupta committed Feb 11, 2013
1 parent 3a951eb commit d870578
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43697cb0973da144156e7d11ddd035aee226ee30
refs/heads/master: 05d88a493746819821733e07bed918a6e09f735b
11 changes: 11 additions & 0 deletions trunk/include/asm-generic/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,18 @@ static inline __must_check long __copy_to_user(void __user *to,
-EFAULT; \
})

#ifndef __put_user_fn

static inline int __put_user_fn(size_t size, void __user *ptr, void *x)
{
size = __copy_to_user(ptr, x, size);
return size ? -EFAULT : size;
}

#define __put_user_fn(sz, u, k) __put_user_fn(sz, u, k)

#endif

extern int __put_user_bad(void) __attribute__((noreturn));

#define __get_user(x, ptr) \
Expand Down Expand Up @@ -225,12 +231,17 @@ extern int __put_user_bad(void) __attribute__((noreturn));
-EFAULT; \
})

#ifndef __get_user_fn
static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
{
size = __copy_from_user(x, ptr, size);
return size ? -EFAULT : size;
}

#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)

#endif

extern int __get_user_bad(void) __attribute__((noreturn));

#ifndef __copy_from_user_inatomic
Expand Down

0 comments on commit d870578

Please sign in to comment.