h8300.patch 994 B

1234567891011121314151617181920212223242526272829
  1. diff -Nur linux-4.3.orig/include/asm-generic/uaccess.h linux-4.3/include/asm-generic/uaccess.h
  2. --- linux-4.3.orig/include/asm-generic/uaccess.h 2015-11-02 01:05:25.000000000 +0100
  3. +++ linux-4.3/include/asm-generic/uaccess.h 2015-11-17 13:01:11.745876944 +0100
  4. @@ -163,9 +163,10 @@
  5. #define put_user(x, ptr) \
  6. ({ \
  7. + __typeof__((ptr)) __p = (ptr); \
  8. might_fault(); \
  9. - access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \
  10. - __put_user(x, ptr) : \
  11. + access_ok(VERIFY_WRITE, __p, sizeof(*__p)) ? \
  12. + __put_user((x), __p) : \
  13. -EFAULT; \
  14. })
  15. @@ -225,9 +226,10 @@
  16. #define get_user(x, ptr) \
  17. ({ \
  18. + __typeof__((ptr)) __p = (ptr); \
  19. might_fault(); \
  20. - access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ? \
  21. - __get_user(x, ptr) : \
  22. + access_ok(VERIFY_READ, __p, sizeof(*__p)) ? \
  23. + __get_user((x), __p) : \
  24. -EFAULT; \
  25. })