Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189271
b: refs/heads/master
c: cc5a428
h: refs/heads/master
i:
  189269: bfe7d3f
  189267: ec42698
  189263: a4359b6
v: v3
  • Loading branch information
Michal Simek committed Apr 1, 2010
1 parent b978333 commit c3af706
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 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: 0dcb409de73edeb221aed38d9ff8640cf41ff0de
refs/heads/master: cc5a428b7ae9c2d6233b5bf6b3e6fbb24ddd1ed5
25 changes: 16 additions & 9 deletions trunk/arch/microblaze/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,28 @@ extern long __user_bad(void);
? __put_user((x), (ptr)) : -EFAULT; \
})

extern unsigned long __copy_tofrom_user(void __user *to,
const void __user *from, unsigned long size);

#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
#define __copy_from_user_inatomic(to, from, n) \
copy_from_user((to), (from), (n))

#define copy_to_user(to, from, n) \
(access_ok(VERIFY_WRITE, (to), (n)) ? \
__copy_tofrom_user((void __user *)(to), \
(__force const void __user *)(from), (n)) \
: -EFAULT)

#define __copy_to_user(to, from, n) copy_to_user((to), (from), (n))
#define __copy_to_user(to, from, n) \
__copy_tofrom_user((void __user *)(to), \
(__force const void __user *)(from), (n))
#define __copy_to_user_inatomic(to, from, n) copy_to_user((to), (from), (n))

static inline long copy_to_user(void __user *to,
const void *from, unsigned long n)
{
might_sleep();
if (access_ok(VERIFY_WRITE, to, n))
return __copy_to_user(to, from, n);
else
return n;
}

#define copy_from_user(to, from, n) \
(access_ok(VERIFY_READ, (from), (n)) ? \
__copy_tofrom_user((__force void __user *)(to), \
Expand All @@ -402,8 +411,6 @@ extern int __strnlen_user(const char __user *sstr, int len);

#endif /* CONFIG_MMU */

extern unsigned long __copy_tofrom_user(void __user *to,
const void __user *from, unsigned long size);

#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
Expand Down

0 comments on commit c3af706

Please sign in to comment.