projects
/
openwrt
/
staging
/
zorun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c01c018
)
ltq-atm: add Linux 5.0+ compatibility
author
Mathias Kresin
<
[email protected]
>
Sun, 7 Jul 2019 15:13:18 +0000
(17:13 +0200)
committer
Mathias Kresin
<
[email protected]
>
Mon, 16 Mar 2020 21:28:16 +0000
(22:28 +0100)
Upstream commit
96d4f267e40f95
("Remove 'type' argument from access_ok()
function") removes the first argument to access_ok.
Adjust the code so it builds with Linux 5.4.
Signed-off-by: Martin Blumenstingl <
[email protected]
>
Signed-off-by: Mathias Kresin <
[email protected]
>
package/kernel/lantiq/ltq-atm/src/ltq_atm.c
patch
|
blob
|
history
diff --git
a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index 6e6f4c66c7d7f4959bfb622b99004f49b7e9495d..267a515df6c0ccaaa4ac9c9797399c89e4003fea 100644
(file)
--- a/
package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/
package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@
-289,9
+289,17
@@
static int ppe_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg)
return -ENOTTY;
if ( _IOC_DIR(cmd) & _IOC_READ )
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
+ ret = !access_ok(arg, _IOC_SIZE(cmd));
+#else
ret = !access_ok(VERIFY_WRITE, arg, _IOC_SIZE(cmd));
+#endif
else if ( _IOC_DIR(cmd) & _IOC_WRITE )
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
+ ret = !access_ok(arg, _IOC_SIZE(cmd));
+#else
ret = !access_ok(VERIFY_READ, arg, _IOC_SIZE(cmd));
+#endif
if ( ret )
return -EFAULT;