diff options
Diffstat (limited to 'arch/x86/lib/usercopy_64.c')
-rw-r--r-- | arch/x86/lib/usercopy_64.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c index e5b130bc2d0e..05928aae911e 100644 --- a/arch/x86/lib/usercopy_64.c +++ b/arch/x86/lib/usercopy_64.c | |||
@@ -18,6 +18,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) | |||
18 | might_fault(); | 18 | might_fault(); |
19 | /* no memory constraint because it doesn't change any memory gcc knows | 19 | /* no memory constraint because it doesn't change any memory gcc knows |
20 | about */ | 20 | about */ |
21 | stac(); | ||
21 | asm volatile( | 22 | asm volatile( |
22 | " testq %[size8],%[size8]\n" | 23 | " testq %[size8],%[size8]\n" |
23 | " jz 4f\n" | 24 | " jz 4f\n" |
@@ -40,6 +41,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) | |||
40 | : [size8] "=&c"(size), [dst] "=&D" (__d0) | 41 | : [size8] "=&c"(size), [dst] "=&D" (__d0) |
41 | : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr), | 42 | : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr), |
42 | [zero] "r" (0UL), [eight] "r" (8UL)); | 43 | [zero] "r" (0UL), [eight] "r" (8UL)); |
44 | clac(); | ||
43 | return size; | 45 | return size; |
44 | } | 46 | } |
45 | EXPORT_SYMBOL(__clear_user); | 47 | EXPORT_SYMBOL(__clear_user); |
@@ -82,5 +84,6 @@ copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest) | |||
82 | for (c = 0, zero_len = len; zerorest && zero_len; --zero_len) | 84 | for (c = 0, zero_len = len; zerorest && zero_len; --zero_len) |
83 | if (__put_user_nocheck(c, to++, sizeof(char))) | 85 | if (__put_user_nocheck(c, to++, sizeof(char))) |
84 | break; | 86 | break; |
87 | clac(); | ||
85 | return len; | 88 | return len; |
86 | } | 89 | } |