aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/uaccess.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:39 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:39 -0400
commit3022d734a54cbd2b65eea9a024564821101b4a9a (patch)
treea1445aeaf8fbdf84898c8cdc13dd98c550b5be0f /include/asm-x86_64/uaccess.h
parentf0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff (diff)
[PATCH] Fix zeroing on exception in copy_*_user
- Don't zero for __copy_from_user_inatomic following i386. This will prevent spurious zeros for parallel file system writers when one does a exception - The string instruction version didn't zero the output on exception. Oops. Also I cleaned up the code a bit while I was at it and added a minor optimization to the string instruction path. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-x86_64/uaccess.h')
-rw-r--r--include/asm-x86_64/uaccess.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index 1e1fa003daa3..bc6812009bd7 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -238,6 +238,7 @@ do { \
238 238
239/* Handles exceptions in both to and from, but doesn't do access_ok */ 239/* Handles exceptions in both to and from, but doesn't do access_ok */
240extern unsigned long copy_user_generic(void *to, const void *from, unsigned len); 240extern unsigned long copy_user_generic(void *to, const void *from, unsigned len);
241extern unsigned long copy_user_generic_dontzero(void *to, const void *from, unsigned len);
241 242
242extern unsigned long copy_to_user(void __user *to, const void *from, unsigned len); 243extern unsigned long copy_to_user(void __user *to, const void *from, unsigned len);
243extern unsigned long copy_from_user(void *to, const void __user *from, unsigned len); 244extern unsigned long copy_from_user(void *to, const void __user *from, unsigned len);
@@ -303,7 +304,6 @@ static __always_inline int __copy_to_user(void __user *dst, const void *src, uns
303 } 304 }
304} 305}
305 306
306
307static __always_inline int __copy_in_user(void __user *dst, const void __user *src, unsigned size) 307static __always_inline int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
308{ 308{
309 int ret = 0; 309 int ret = 0;
@@ -352,7 +352,7 @@ long strlen_user(const char __user *str);
352unsigned long clear_user(void __user *mem, unsigned long len); 352unsigned long clear_user(void __user *mem, unsigned long len);
353unsigned long __clear_user(void __user *mem, unsigned long len); 353unsigned long __clear_user(void __user *mem, unsigned long len);
354 354
355#define __copy_to_user_inatomic __copy_to_user 355extern long __copy_from_user_inatomic(void *dst, const void __user *src, unsigned size);
356#define __copy_from_user_inatomic __copy_from_user 356#define __copy_to_user_inatomic copy_user_generic
357 357
358#endif /* __X86_64_UACCESS_H */ 358#endif /* __X86_64_UACCESS_H */