Advertisement
Guest User

Untitled

a guest
Jan 29th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
  2. index b218b85..7b7e61e 100644
  3. --- a/include/asm-generic/uaccess.h
  4. +++ b/include/asm-generic/uaccess.h
  5. @@ -162,9 +162,10 @@ static inline __must_check long __copy_to_user(void __user *to,
  6.  
  7. #define put_user(x, ptr) \
  8. ({ \
  9. + __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
  10. might_sleep(); \
  11. - access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \
  12. - __put_user(x, ptr) : \
  13. + access_ok(VERIFY_WRITE, __pu_addr, sizeof(*ptr)) ? \
  14. + __put_user(x, __pu_addr) : \
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement