This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 29th, 2011  |  syntax: None  |  size: 0.81 KB  |  views: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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) :                              \
clone this paste RAW Paste Data