diff options
-rw-r--r-- | include/asm-x86/uaccess_64.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h index 42c01aa70e72..e0875d7ae898 100644 --- a/include/asm-x86/uaccess_64.h +++ b/include/asm-x86/uaccess_64.h | |||
@@ -61,27 +61,27 @@ extern void __put_user_bad(void); | |||
61 | ({ \ | 61 | ({ \ |
62 | int __gu_err; \ | 62 | int __gu_err; \ |
63 | unsigned long __gu_val; \ | 63 | unsigned long __gu_val; \ |
64 | __get_user_size(__gu_val, (ptr), (size), __gu_err); \ | 64 | __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT);\ |
65 | (x) = (__force typeof(*(ptr)))__gu_val; \ | 65 | (x) = (__force typeof(*(ptr)))__gu_val; \ |
66 | __gu_err; \ | 66 | __gu_err; \ |
67 | }) | 67 | }) |
68 | 68 | ||
69 | #define __get_user_size(x, ptr, size, retval) \ | 69 | #define __get_user_size(x, ptr, size, retval, errret) \ |
70 | do { \ | 70 | do { \ |
71 | retval = 0; \ | 71 | retval = 0; \ |
72 | __chk_user_ptr(ptr); \ | 72 | __chk_user_ptr(ptr); \ |
73 | switch (size) { \ | 73 | switch (size) { \ |
74 | case 1: \ | 74 | case 1: \ |
75 | __get_user_asm(x, ptr, retval, "b", "b", "=q", -EFAULT);\ | 75 | __get_user_asm(x, ptr, retval, "b", "b", "=q", errret);\ |
76 | break; \ | 76 | break; \ |
77 | case 2: \ | 77 | case 2: \ |
78 | __get_user_asm(x, ptr, retval, "w", "w", "=r", -EFAULT);\ | 78 | __get_user_asm(x, ptr, retval, "w", "w", "=r", errret);\ |
79 | break; \ | 79 | break; \ |
80 | case 4: \ | 80 | case 4: \ |
81 | __get_user_asm(x, ptr, retval, "l", "k", "=r", -EFAULT);\ | 81 | __get_user_asm(x, ptr, retval, "l", "k", "=r", errret);\ |
82 | break; \ | 82 | break; \ |
83 | case 8: \ | 83 | case 8: \ |
84 | __get_user_asm(x, ptr, retval, "q", "", "=r", -EFAULT); \ | 84 | __get_user_asm(x, ptr, retval, "q", "", "=r", errret); \ |
85 | break; \ | 85 | break; \ |
86 | default: \ | 86 | default: \ |
87 | (x) = __get_user_bad(); \ | 87 | (x) = __get_user_bad(); \ |