({ \
int __gu_err; \
unsigned long __gu_val; \
- __get_user_size(__gu_val, (ptr), (size), __gu_err); \
+ __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT);\
(x) = (__force typeof(*(ptr)))__gu_val; \
__gu_err; \
})
-#define __get_user_size(x, ptr, size, retval) \
+#define __get_user_size(x, ptr, size, retval, errret) \
do { \
retval = 0; \
__chk_user_ptr(ptr); \
switch (size) { \
case 1: \
- __get_user_asm(x, ptr, retval, "b", "b", "=q", -EFAULT);\
+ __get_user_asm(x, ptr, retval, "b", "b", "=q", errret);\
break; \
case 2: \
- __get_user_asm(x, ptr, retval, "w", "w", "=r", -EFAULT);\
+ __get_user_asm(x, ptr, retval, "w", "w", "=r", errret);\
break; \
case 4: \
- __get_user_asm(x, ptr, retval, "l", "k", "=r", -EFAULT);\
+ __get_user_asm(x, ptr, retval, "l", "k", "=r", errret);\
break; \
case 8: \
- __get_user_asm(x, ptr, retval, "q", "", "=r", -EFAULT); \
+ __get_user_asm(x, ptr, retval, "q", "", "=r", errret); \
break; \
default: \
(x) = __get_user_bad(); \