Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189272
b: refs/heads/master
c: 4270690
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Apr 1, 2010
1 parent c3af706 commit 2345543
Show file tree
Hide file tree
Showing 2 changed files with 15 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: cc5a428b7ae9c2d6233b5bf6b3e6fbb24ddd1ed5
refs/heads/master: 4270690bd4b1420a8d634ea31953a1c4def2a44a
23 changes: 14 additions & 9 deletions trunk/arch/microblaze/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,24 @@ extern long __user_bad(void);
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(to, from, n) \
__copy_tofrom_user((__force void __user *)(to), \
(void __user *)(from), (n))
#define __copy_from_user_inatomic(to, from, n) \
copy_from_user((to), (from), (n))

static inline long copy_from_user(void *to,
const void __user *from, unsigned long n)
{
might_sleep();
if (access_ok(VERIFY_READ, from, n))
return __copy_from_user(to, from, n);
else
return n;
}

#define __copy_to_user(to, from, n) \
__copy_tofrom_user((void __user *)(to), \
__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))

Expand All @@ -394,12 +406,6 @@ static inline long copy_to_user(void __user *to,
return n;
}

#define copy_from_user(to, from, n) \
(access_ok(VERIFY_READ, (from), (n)) ? \
__copy_tofrom_user((__force void __user *)(to), \
(void __user *)(from), (n)) \
: -EFAULT)

extern int __strncpy_user(char *to, const char __user *from, int len);
extern int __strnlen_user(const char __user *sstr, int len);

Expand All @@ -411,7 +417,6 @@ extern int __strnlen_user(const char __user *sstr, int len);

#endif /* CONFIG_MMU */


#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */

Expand Down

0 comments on commit 2345543

Please sign in to comment.