|
@@ -188,64 +188,34 @@ int __get_user_bad(void);
|
|
|
unsigned long __must_check ___copy_from_user(void *to,
|
|
|
const void __user *from,
|
|
|
unsigned long size);
|
|
|
-unsigned long copy_from_user_fixup(void *to, const void __user *from,
|
|
|
- unsigned long size);
|
|
|
static inline unsigned long __must_check
|
|
|
copy_from_user(void *to, const void __user *from, unsigned long size)
|
|
|
{
|
|
|
- unsigned long ret;
|
|
|
-
|
|
|
check_object_size(to, size, false);
|
|
|
|
|
|
- ret = ___copy_from_user(to, from, size);
|
|
|
- if (unlikely(ret)) {
|
|
|
- if ((long)ret < 0)
|
|
|
- ret = copy_from_user_fixup(to, from, size);
|
|
|
- return ret;
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
+ return ___copy_from_user(to, from, size);
|
|
|
}
|
|
|
#define __copy_from_user copy_from_user
|
|
|
|
|
|
unsigned long __must_check ___copy_to_user(void __user *to,
|
|
|
const void *from,
|
|
|
unsigned long size);
|
|
|
-unsigned long copy_to_user_fixup(void __user *to, const void *from,
|
|
|
- unsigned long size);
|
|
|
static inline unsigned long __must_check
|
|
|
copy_to_user(void __user *to, const void *from, unsigned long size)
|
|
|
{
|
|
|
- unsigned long ret;
|
|
|
-
|
|
|
check_object_size(from, size, true);
|
|
|
|
|
|
- ret = ___copy_to_user(to, from, size);
|
|
|
- if (unlikely(ret)) {
|
|
|
- if ((long)ret < 0)
|
|
|
- ret = copy_to_user_fixup(to, from, size);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- return ret;
|
|
|
+ return ___copy_to_user(to, from, size);
|
|
|
}
|
|
|
#define __copy_to_user copy_to_user
|
|
|
|
|
|
unsigned long __must_check ___copy_in_user(void __user *to,
|
|
|
const void __user *from,
|
|
|
unsigned long size);
|
|
|
-unsigned long copy_in_user_fixup(void __user *to, void __user *from,
|
|
|
- unsigned long size);
|
|
|
static inline unsigned long __must_check
|
|
|
copy_in_user(void __user *to, void __user *from, unsigned long size)
|
|
|
{
|
|
|
- unsigned long ret = ___copy_in_user(to, from, size);
|
|
|
-
|
|
|
- if (unlikely(ret)) {
|
|
|
- if ((long)ret < 0)
|
|
|
- ret = copy_in_user_fixup(to, from, size);
|
|
|
- return ret;
|
|
|
- }
|
|
|
- return ret;
|
|
|
+ return ___copy_in_user(to, from, size);
|
|
|
}
|
|
|
#define __copy_in_user copy_in_user
|
|
|
|