summarylogtreecommitdiffstats
path: root/access_ok_remove_type.patch
diff options
context:
space:
mode:
Diffstat (limited to 'access_ok_remove_type.patch')
-rw-r--r--access_ok_remove_type.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/access_ok_remove_type.patch b/access_ok_remove_type.patch
new file mode 100644
index 000000000000..f3a8f3906877
--- /dev/null
+++ b/access_ok_remove_type.patch
@@ -0,0 +1,33 @@
+diff -r -u a/eq3_char_loop.c b/eq3_char_loop.c
+--- a/eq3_char_loop.c 2020-03-27 23:57:42.975868561 +0100
++++ b/eq3_char_loop.c 2020-03-27 23:58:16.482782251 +0100
+@@ -456,9 +456,9 @@
+ * "write" is reversed
+ */
+ if (_IOC_DIR(cmd) & _IOC_READ)
+- ret = !access_ok(VERIFY_WRITE, (void *)arg, _IOC_SIZE(cmd));
++ ret = !access_ok((void *)arg, _IOC_SIZE(cmd));
+ else if (_IOC_DIR(cmd) & _IOC_WRITE)
+- ret = !access_ok(VERIFY_READ, (void *)arg, _IOC_SIZE(cmd));
++ ret = !access_ok((void *)arg, _IOC_SIZE(cmd));
+ if (ret) return -EFAULT;
+
+ switch(cmd) {
+@@ -500,7 +500,7 @@
+ switch(cmd) {
+
+ case TCGETS:
+- if( access_ok(VERIFY_READ, (void *)arg, sizeof(struct termios) ) )
++ if( access_ok((void *)arg, sizeof(struct termios) ) )
+ {
+ ret = copy_to_user( (void*)arg, &channel->termios, sizeof(struct termios) );
+ } else {
+@@ -508,7 +508,7 @@
+ }
+ break;
+ case TCSETS:
+- if( access_ok(VERIFY_WRITE, (void *)arg, sizeof(struct termios) ) )
++ if( access_ok((void *)arg, sizeof(struct termios) ) )
+ {
+ ret = copy_from_user( &channel->termios, (void*)arg, sizeof(struct termios) );
+ } else {