projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae853e7
)
[PATCH] Add proper sparse __user casts to __copy_to_user_inatomic
author
Andi Kleen
<
[email protected]
>
Fri, 29 Sep 2006 23:47:55 +0000
(
01:47
+0200)
committer
Andi Kleen
<
[email protected]
>
Fri, 29 Sep 2006 23:47:55 +0000
(
01:47
+0200)
Noticed by Al Viro
Cc:
[email protected]
Signed-off-by: Andi Kleen <
[email protected]
>
include/asm-x86_64/uaccess.h
patch
|
blob
|
history
diff --git
a/include/asm-x86_64/uaccess.h
b/include/asm-x86_64/uaccess.h
index e856570c068952045b73bd25a2cf45d22ed7aeb2..19f99178fe83735cc17bff14516f529c17e479c3 100644
(file)
--- a/
include/asm-x86_64/uaccess.h
+++ b/
include/asm-x86_64/uaccess.h
@@
-361,6
+361,11
@@
__must_check unsigned long clear_user(void __user *mem, unsigned long len);
__must_check unsigned long __clear_user(void __user *mem, unsigned long len);
__must_check long __copy_from_user_inatomic(void *dst, const void __user *src, unsigned size);
-#define __copy_to_user_inatomic copy_user_generic
+
+static __must_check __always_inline int
+__copy_to_user_inatomic(void __user *dst, const void *src, unsigned size)
+{
+ return copy_user_generic((__force void *)dst, src, size);
+}
#endif /* __X86_64_UACCESS_H */