Created
March 7, 2019 17:32
-
-
Save b1tninja/79047b199a44404b4fba5f45cd903a94 to your computer and use it in GitHub Desktop.
New uaccess.h access_ok macro has no type parameter. This ignores one if given.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h | |
index d82c78a79da5..7edb6ab268ad 100644 | |
--- a/include/asm-generic/uaccess.h | |
+++ b/include/asm-generic/uaccess.h | |
@@ -38 +38,5 @@ static inline void set_fs(mm_segment_t fs) | |
-#define access_ok(addr, size) __access_ok((unsigned long)(addr),(size)) | |
+#define __typed_access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size)) \ | |
+ #warning uaccess.h access_ok macro no longer has a type parameter. | |
+#define __untyped_access_ok(addr, size) __access_ok((unsigned long)(addr),(size)) | |
+#define __get_access_ok(_1,_2,_3,NAME,...) NAME | |
+#define access_ok(...) __get_access_ok(__VA_ARGS__, __typed_access_ok, __untyped_access_ok)(__VA_ARGS__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment