Skip to content

Commit

Permalink
[PATCH] Add proper sparse __user casts to __copy_to_user_inatomic
Browse files Browse the repository at this point in the history
Noticed by Al Viro

Cc: viro@ftp.linux.org.uk

Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Sep 29, 2006
1 parent ae853e7 commit b885808
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/asm-x86_64/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit b885808

Please sign in to comment.